/* === Reset & base === */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Lato', 'Raleway', 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(160deg, #dce8f5 0%, #eef1f6 50%, #e8edf5 100%);
  background-attachment: fixed;
  color: #1a1a2e;
  min-height: 100vh;
}

/* === Header === */
header {
  background: linear-gradient(135deg, #001233 0%, #003366 55%, #001e4a 100%);
  color: white;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
}

header video {
  height: 90px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(100, 180, 255, 0.25));
}

header h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

header h2 {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === Navigation === */
nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: white;
  text-decoration: underline;
}

/* === Page layout === */
.page-container {
  display: flex;
  gap: 1.5rem;
  max-width: 1300px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* === Main content card === */
.mainPage {
  flex: 1;
  padding: 1.25rem 1.75rem 1.75rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 6px 24px rgba(0, 0, 0, 0.07);
  text-align: left;
}

/* === Breadcrumb === */
section.mainPage > a {
  color: #6b7a99;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

section.mainPage > a:hover {
  color: #003366;
  text-decoration: underline;
}

/* === Typography === */
h1 { font-size: 1.75rem; margin: 0 0 0.5rem; color: #1a1a2e; }
h2 { font-size: 1.3rem;  margin: 0 0 0.75rem; color: #1a1a2e; }
h3 { font-size: 1.1rem;  margin: 0 0 0.5rem;  color: #1a1a2e; }
h4 { font-size: 1rem;    margin: 0 0 0.5rem;  color: #1a1a2e; }

/* === Links === */
a {
  color: #0055a5;
  text-decoration: none;
}

a:hover {
  color: #003366;
  text-decoration: underline;
}

/* === Buttons === */
button {
  background-color: #003366;
  color: #ffffff;
  padding: 0.45rem 1.1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.01em;
}

button:hover {
  background-color: #0055a5;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.25);
}

button:active {
  background-color: #002244;
  box-shadow: none;
}

.btn {
  display: inline-block;
  background-color: #003366;
  color: white;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background-color: #0055a5;
  color: white;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.25);
}

/* === Forms === */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #c8d0de;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1a1a2e;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0055a5;
  box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.12);
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
}

/* === Login panel (index page sidebar) === */
.login-panel {
  flex: 0 0 230px;
  background: white;
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 6px 24px rgba(0, 0, 0, 0.07);
  align-self: flex-start;
}

.login-form h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #003366;
  font-size: 1.15rem;
}

.login-btn {
  margin-top: 0.5rem;
  width: 100%;
}

/* === Data tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.data-table thead th {
  background-color: #003366;
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #eaecf0;
  transition: background-color 0.1s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: #eef4ff;
}

.data-table tbody td {
  padding: 0.6rem 0.85rem;
  color: #1a1a2e;
  vertical-align: top;
}

.data-table tfoot td {
  padding: 0.6rem 0.85rem;
  background-color: #f4f6fa;
  font-weight: 600;
  border-top: 2px solid #d0d7e3;
}

/* === Section headers (order/shipment/invoice detail pages) === */
.section-header {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #003366;
  color: #003366;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* === Hero (public-facing pages) === */
.hero {
  max-width: 900px;
  margin: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 6px 24px rgba(0, 0, 0, 0.07);
  padding: 1.75rem;
}

.hero h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.hero p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #333;
}

/* === Feature lists === */
.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  background-color: white;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* === Background video (public landing page only) === */
#background-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
  object-fit: cover;
}

/* === Footer === */
footer {
  color: #888;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
}

/* === Error pane === */
#errorPane {
  color: #c0392b;
  font-size: 0.875rem;
  min-height: 1.2em;
}

/* === Secondary / danger buttons === */
.btn-secondary {
  background-color: #6b7a99;
}

.btn-secondary:hover {
  background-color: #535e78;
  box-shadow: 0 2px 8px rgba(83, 94, 120, 0.25);
}

.btn-danger {
  background-color: #c0392b;
  color: white;
  padding: 0.45rem 1.1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.01em;
}

.btn-danger:hover {
  background-color: #a93226;
  box-shadow: 0 2px 8px rgba(169, 50, 38, 0.3);
}

/* === Page action bar (button rows at top of forms) === */
.page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* === Field label + value pairs (view pages) === */
.mainPage .container h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7a99;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.25rem;
}

.mainPage .container h3 + p {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: #1a1a2e;
  min-height: 1.2em;
}

/* === Form h3 labels (edit pages) === */
.mainPage .container form h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7a99;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.1rem 0 0.3rem;
}

/* === Navigation card grid (organization hub) === */
.nav-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.nav-card {
  display: block;
  padding: 0.9rem 1.1rem;
  background: #f4f6fa;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  color: #003366;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-card:hover {
  background: #e5eeff;
  border-color: #0055a5;
  color: #003366;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.12);
}

/* === Info sections (subscription settings style) === */
.info-section {
  background: #f8f9fc;
  border: 1px solid #e0e6f0;
  border-radius: 8px;
  padding: 1rem 1.25rem 1.1rem;
  margin-bottom: 0.85rem;
}

.info-section h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #1a1a2e;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.info-section p {
  margin: 0 0 0.75rem;
  color: #555;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* === External indicator badge === */
.external-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  background: #fff3cd;
  color: #7a5800;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* === Page title spacing inside mainPage === */
.mainPage .container > h2:first-of-type {
  margin-top: 0.25rem;
}

/* === Detail page: info grid === */
.order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 28px;
  margin-top: 12px;
}

.order-detail-item label {
  font-weight: 700;
  display: block;
  font-size: 0.75rem;
  color: #6b7a99;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-detail-item span {
  font-size: 0.95rem;
  color: #1a1a2e;
}

.order-detail-item.full-width {
  grid-column: 1 / -1;
}

/* === Detail page: notes block === */
.order-notes {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f4f6fa;
  border-left: 4px solid #003366;
  border-radius: 6px;
}

.order-notes label {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7a99;
}

/* === Detail page: table item notes sub-row === */
td.item-notes {
  font-size: 0.85em;
  color: #6b7a99;
  font-style: italic;
}

/* === Status & priority badges === */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-Open,
.status-Back\.ordered { background: #d4f4e0; color: #1a6b3a; }
.status-Shipped        { background: #d0e8ff; color: #004085; }
.status-Completed      { background: #e4e6ea; color: #3a3d44; }
.status-Canceled       { background: #fde0e0; color: #7a1c1c; }
.status-Finalized      { background: #d0e8ff; color: #004085; }
.status-Complete       { background: #e4e6ea; color: #3a3d44; }
.status-Paid           { background: #d4f4e0; color: #1a6b3a; }
.status-Credit         { background: #d0e8ff; color: #004085; }

.priority-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff3cd;
  color: #7a5800;
  margin-left: 8px;
}

.rush-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fde0e0;
  color: #7a1c1c;
  margin-left: 8px;
}

.shipped-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
}

.shipped-yes { background: #d0e8ff; color: #004085; }
.shipped-no  { background: #fff3cd; color: #7a5800; }

/* === Responsive === */
@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
    margin: 1rem;
    padding: 0;
    gap: 1rem;
  }

  .login-panel {
    flex: none;
  }

  .mainPage {
    padding: 1rem 1.25rem;
  }

  header h1 {
    font-size: 1.4rem;
  }

  header h2 {
    font-size: 0.8rem;
  }

  header video {
    height: 70px;
  }
}
