
  * {
    box-sizing: border-box;
  }

:root {
  --page-blue: #59a9df;
  --nav-blue: #0d437a;
  --primary-blue: #0f67b3;
  --primary-blue-hover: #0c5899;
  --text-dark: #1d2d3a;
  --text-heading: #1d4463;
  --text-muted: #5f7e95;
  --panel-border: #d8e6f0;
  --panel-bg: #f9fcff;
  --secondary-btn-bg: #edf5fb;
  --secondary-btn-border: #cfe0ed;
  --warning-bg: #fff8e8;
  --warning-border: #f1d38b;
  --warning-panel-bg: #fffdf7;
  --warning-heading: #8a5a00;
  --older-badge-bg: #fdecea;
  --older-badge-text: #b3261e;
  --success-bg: #e6f4ea;
  --success-border: #bfe0c5;
  --success-text: #2e7d32;
  --favorite-bg: #fff8e8;
  --favorite-border: #f1d38b;
  --favorite-text: #8a5a00;
  --card-shadow: 0 14px 34px rgba(0,0,0,0.14);
  --soft-shadow: 0 10px 22px rgba(0,0,0,0.10);

  /* Template Design Tokens (2026 dashboard refresh) */
  --card-bg: #ffffff;
  --border: #dfe7f1;
  --border-soft: #edf2f8;
  --text: #071b3a;
  --muted: #61708a;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(12, 44, 86, 0.10);
  --green: #11b978;
  --red: #ef3d4a;

  /* Map existing colors to template naming for compatibility */
  --primary: var(--primary-blue);
  --primary-dark: var(--primary-blue-hover);
  --primary-soft: var(--secondary-btn-bg);
  --page-bg: var(--panel-bg);
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--page-blue);
  color: var(--text-dark);
}

  
/* ===== HEADER ===== */

.app-header {
  padding: 16px 20px 12px;
  background: linear-gradient(135deg, #4a8ec0 0%, #4088b8 50%, #4a9cd3 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  box-shadow:
    0 4px 12px rgba(10, 53, 91, 0.25),
    0 2px 4px rgba(10, 53, 91, 0.15);
}

.global-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 12px;
  overflow: visible;
}


.system-title {
  text-align: center;
  color: #ffffff;
}

.system-title .title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  letter-spacing: 0.3px;
}

.system-title .subtitle {
  font-size: 13px;
  color: #e8f4f8;
  font-weight: 500;
}

.global-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  overflow: visible;
}

/* top buttons */

.header-btn, .menu-trigger {
  min-height: 35px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--secondary-btn-border);
  background: #ffffff;
  color: #244866;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.header-btn.primary {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
}

.header-btn.primary a {
  color: #ffffff;
  text-decoration: none;
}

.header-btn.primary:hover {
  background: var(--primary-blue-hover);
}

.menu-trigger:hover,
.header-btn:hover {
  background: #f7fbff;
}

.header-btn.primary:hover {
  background: var(--primary-blue-hover);
}

.menu-trigger[aria-expanded="true"] {
  background: #eef6fc;
  border-color: #a9cbe5;
}

.header-btn svg,
.menu-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.menu-wrap {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.menu-trigger .chev {
  width: 10px;
  height: 10px;
  transition: transform 0.2s;
}

.menu-wrap.open .menu-trigger .chev {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #d7e4ee;
  border-radius: 12px;
  box-shadow: 0 16px 28px rgba(0,0,0,0.14);
  padding: 8px;
  display: none;
  z-index: 9999;
}

.menu-wrap.open .dropdown {
  display: block;
}

.dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  text-decoration: none;
  color: #244866;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
}

.dropdown a:hover {
  background: #f4f9fd;
}

.dropdown a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.chevron-icon {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: 0 0 auto;
}

/* ===== BREADCRUMB NAVIGATION ===== */

.breadcrumb-bar {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,252,255,0.9) 100%);
  padding: 12px 20px;
  border-bottom: 2px solid rgba(10, 53, 91, 0.2);
  box-shadow: 0 2px 8px rgba(10, 53, 91, 0.08);
  position: sticky;
  top: 84px;
  z-index: 999;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #1d4463;
  font-weight: 500;
}

.breadcrumb-nav a {
  color: var(--primary-blue);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-nav a:hover {
  background: rgba(15, 103, 179, 0.1);
  color: var(--primary-blue-hover);
}

.breadcrumb-nav .separator {
  color: #7b91a8;
  font-size: 12px;
  user-select: none;
}

.breadcrumb-nav .current {
  color: #000000;
  font-weight: 600;
  padding: 4px 8px;
}

.breadcrumb-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.breadcrumb-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.breadcrumb-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  color: var(--text-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.breadcrumb-action-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.breadcrumb-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Badge for icon counts (e.g., comment count) */
.icon-badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid white;
  line-height: 1;
}

/* ===== CARD COMPONENT (Enhanced for Dashboard Template) ===== */

  .card {
    width: 100%;
    max-width: 550px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    display: flex;
    flex-direction: column;
  }

  /* Dashboard cards - override max-width for full width */
  .three-col-grid .card {
    max-width: none;
    display: block;
    height: auto;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }

  .card-header p {
    margin: 6px 0 0 42px;
    font-size: 15px;
  }

  .card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
  }

  .title-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .section-icon {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 17px;
  }

  .text-action {
    margin-top: 12px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
  }

  .text-action:hover {
    color: var(--primary-dark);
  }

  /* Icon Badge Component */
  .icon-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    flex-shrink: 0;
  }

  .icon-badge svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
  }

  /* Panel Heading with Icon Badge */
  .panel-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
  }

  .card .panel-heading h2,
  .card .panel-heading h3 {
    margin: 0 !important;
    font-size: 20px;
    color: var(--text-heading);
    line-height: 1.2;
    text-align: left !important;
  }

  .panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: inline;
    margin-left: 8px;
    font-weight: normal;
  }

/* ===== LOGIN / PASSWORD / ACCESS ===== */

  .card.auth-card {
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    padding: 34px 32px 28px;
  }

  .card.auth-card {
    min-height: 420px;
  }
  
  .card h1 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1d4463;
    text-align: center;
  }

  .card .subtitle {
    margin: 0 0 26px;
    text-align: center;
    color: #5f7e95;
    font-size: 15px;
  }

  .form-group {
    margin-bottom: 18px;
  }
  
   form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
  }

  .form-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    align-items: center;
  }

  .form-row.top-align {
    align-items: start;
  }
  
  .instructions {
    margin: 0 0 18px;
    font-size: 14px;
    color: #648097;
    line-height: 1.4;
  }

  label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #244866;
	text-align: right;
	padding-top: 2px;
  }

  input[type="text"],
  input[type="password"],
  input[type="email"],
  select,
  textarea { 
    width: 100%;
    height: 36px;
    border: 1px solid #c8d9e7;
    border-radius: 9px;
    padding: 0 14px;
    font-size: 16px;
    color: #1b2c3a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

    input:focus,
	select:focus,
    textarea:focus {
    outline: none;
    border-color: #1b74bd;
    box-shadow: 0 0 0 4px rgba(27, 116, 189, 0.14);
  }

  textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.45;
  }
  
  .help-text {
    margin: -4px 0 20px;
    color: #648097;
    font-size: 13px;
  }

  .primary-btn {
    min-width: 180px;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #0f67b3;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 8px 18px rgba(15, 103, 179, 0.18);
    margin-top: auto;
    align-self: center;
    padding: 0 32px;
  }

  .primary-btn:hover {
    background: #0c5899;
  }

  .primary-btn:active {
    transform: translateY(1px);
  }

  .primary-btn.update-pending,
  .compact-btn.update-pending {
    background: #f57c00;
    box-shadow: 0 8px 18px rgba(245, 124, 0, 0.25);
  }

  .primary-btn.update-pending:hover,
  .compact-btn.update-pending:hover {
    background: #e67100;
  }

  .secondary-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }

  .secondary-links a {
    color: #0f67b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
  }

  .secondary-links a:hover {
    text-decoration: underline;
  }

/* ===== GRID LAYOUTS ===== */

.top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.top-grid .card {
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.top-grid .card-header {
  padding-bottom: 12px;
  justify-content: flex-start !important;
}

.top-grid .card-header.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start !important;
}

.top-grid .card-header h2 {
  font-size: 18px;
  margin: 0;
  text-align: left !important;
}

/* Card header with subtitle */
.header-content {
  width: 100%;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.header-subtitle {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  padding-left: 36px;
}

.top-grid .card-content {
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.top-grid .card-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Remove nested card styling in top-grid */
.top-grid .form-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Left-align labels in top-grid forms */
.top-grid .popup-container .form-row {
  grid-template-columns: 100px 1fr;
}

.top-grid .popup-container .form-row label {
  text-align: left !important;
}

/* Allow scrollbar in Permission Preview card and Role Access card */
.permission-preview-card .card-content,
.role-access-card .card-content {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  -ms-overflow-style: auto;
}

.permission-preview-card .card-content::-webkit-scrollbar,
.role-access-card .card-content::-webkit-scrollbar {
  display: block;
  width: 6px;
}

.permission-preview-card .card-content::-webkit-scrollbar-track,
.role-access-card .card-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.permission-preview-card .card-content::-webkit-scrollbar-thumb,
.role-access-card .card-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.permission-preview-card .card-content::-webkit-scrollbar-thumb:hover,
.role-access-card .card-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.top-grid.two-col {
  grid-template-columns: 380px 1fr;
}

  @media (max-width: 480px) {
    .login-card {
      padding: 28px 20px 24px;
    }

    .secondary-links {
      flex-direction: column;
      align-items: center;
    }
  }
  
  .fail-message {
    display: none;
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
  }
  
  .success-message {
    display: none;
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #e6f4ea;
    color: #2e7d32;
    font-size: 14px;
    text-align: center;
  }

/* ===== UTILITY CLASSES ===== */

  /* Spacing utilities */
  .mb-0 { margin-bottom: 0; }
  .mb-1 { margin-bottom: 8px; }
  .mb-2 { margin-bottom: 16px; }
  .mb-3 { margin-bottom: 24px; }
  .mt-1 { margin-top: 8px; }
  .mt-2 { margin-top: 16px; }
  .mt-3 { margin-top: 24px; }
  .p-1 { padding: 8px; }
  .p-2 { padding: 16px; }

  /* Text utilities */
  .text-muted { color: var(--muted); }
  .text-small { font-size: 13px; }
  .text-center { text-align: center; }
  .font-bold { font-weight: 700; }

  /* Divider */
  .divider {
    border-top: 1px solid var(--border);
    margin: 18px 0;
  }

  /* Section headers */
  .section-header {
    text-align: center;
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 12px;
  }

  .section-header-large {
    text-align: center;
    font-size: 16pt;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
  }

  .section-subtitle {
    text-align: center;
    font-size: 13pt;
    margin-bottom: 15px;
    color: #666;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
  }

  /* Flex utilities */
  .flex-center {
    display: flex;
    gap: 12px;
    justify-content: center;
  }

  .flex-center.mt-2 {
    margin-top: 20px;
  }

  .page-title {
    text-align: center;
    color: #103b5c;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 32px;
  }

  .two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }

  @media (max-width: 768px) {
    .two-col-grid {
      grid-template-columns: 1fr;
    }
  }

  /* Dashboard Layout - Template 2-column design */
  .dashboard {
    max-width: 1760px;
    margin: 22px auto 0;
    padding: 0 32px 40px;
    display: grid;
    grid-template-columns: minmax(760px, 1.6fr) minmax(480px, 1fr);
    gap: 22px;
    align-items: start;
  }

  .left-column {
    display: grid;
    gap: 22px;
  }

  .right-column {
    display: grid;
    gap: 18px;
  }

  .card-full-width {
    grid-column: 1 / -1;
  }

  /* Legacy three-column grid (keeping for compatibility) */
  .three-col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    align-items: start;
  }

  @media (max-width: 1200px) {
    .three-col-grid {
      grid-template-columns: 1fr;
    }

    .top-grid {
      grid-template-columns: 1fr;
    }
  }

  .card h2 {
    margin: 0 0 24px;
    font-size: 20px;
    color: var(--text-heading);
    text-align: center;
  }

  .button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .action-btn {
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    background: var(--primary-blue);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 8px 18px rgba(15, 103, 179, 0.18);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .action-btn:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 103, 179, 0.25);
  }

  .action-btn:active {
    transform: translateY(0);
  }

  .compact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--primary-blue);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(15, 103, 179, 0.15);
    text-decoration: none;
    text-align: center;
  }

  .compact-btn i {
    width: 18px;
    height: 18px;
  }

  .compact-btn svg {
    stroke: white;
    stroke-width: 2.5;
  }

  .compact-btn:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 103, 179, 0.2);
  }

  .compact-btn:active {
    transform: translateY(0);
  }

  .card-section-title {
    text-align: center;
    font-size: 16pt;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
  }

  .badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10pt;
    font-weight: bold;
    color: white;
  }

  .badge-success {
    background-color: #10b981;
  }

  .badge-info {
    background-color: #3b82f6;
  }

  .badge-danger {
    background-color: #ef4444;
  }

  .badge-primary {
    background-color: #3b82f6;
  }

  .badge-neutral {
    background-color: #6b7280;
  }

  .link-btn {
    display: inline-block;
    background-color: #0891b2;
    color: white !important;
    padding: 15px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16pt;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  }

  .link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
    background-color: #0e7490;
  }

  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
  }

  .metric-card {
    text-align: center;
    padding: 16px;
    background: var(--primary-soft);
    border-radius: var(--radius);
  }

  .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
  }

  .metric-label {
    font-size: 12px;
    color: var(--muted);
  }

  .chart-container {
    margin-bottom: 20px;
  }

  .chart-container.chart-tall {
    height: 250px;
  }

  .chart-label {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: left;
  }

  .chart-label a {
    text-decoration: none;
    color: black;
  }

  .chart-canvas {
    height: 40px;
  }

/* ===== CONFIG TABLE COMPONENT (Dashboard Template) ===== */

.config-table {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.config-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.65fr;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  text-decoration: none;
  color: inherit;
}

.config-row:not(.table-head) {
  transition: background 0.15s ease;
}

.config-row:not(.table-head):hover {
  background: #f7fbff;
}

.config-row.table-head {
  min-height: 48px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.customer-name {
  font-weight: 600;
  color: var(--text);
}

.time {
  color: var(--muted);
  font-size: 13px;
}

.card-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #20375a;
  font-size: 15px;
}

.metric-footer strong {
  font-size: 18px;
  font-weight: 700;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 8px;
  font-size: 16px;
}

/* Ready Card (Evo Sheet) */
.ready-card {
  background: linear-gradient(135deg, #ffffff 0%, #f3f9ff 100%);
}

.ready-card p {
  margin: 6px 0 10px;
}

.ready-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
}

.ready-content {
  padding: 24px;
}

/* Reports Card */
.report-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.report-link {
  height: 48px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  color: #152744;
  background: #fff;
  font-size: 14px;
  text-decoration: none;
}

.report-link:nth-child(1),
.report-link:nth-child(2) {
  border-radius: 8px 8px 0 0;
}

.report-link:nth-last-child(1),
.report-link:nth-last-child(2) {
  border-radius: 0 0 8px 8px;
}

.report-link:hover {
  background: #f7fbff;
}

.report-link span:first-child {
  color: var(--primary);
  font-size: 16px;
}

.report-link b {
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
}

.customer-logo {
  max-width: 160px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.acd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.acd-row {
  display: grid;
  grid-template-columns: 180px 1fr 30%;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: box-shadow 0.15s ease;
  align-items: center;
}

.acd-row:hover {
  box-shadow: var(--shadow);
}

/* ===== PILLS & RELEASE NOTES (Dashboard Template) ===== */

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pill.added {
  background: rgba(17, 185, 120, 0.12);
  color: var(--green);
}

.pill.improved {
  background: rgba(52, 120, 246, 0.12);
  color: #3478f6;
}

.pill.fixed {
  background: rgba(239, 61, 74, 0.10);
  color: var(--red);
}

.release-section {
  margin-bottom: 20px;
}

.release-section:last-child {
  margin-bottom: 0;
}

.release-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.release-item:last-child {
  border-bottom: none;
}

.release-content {
  flex: 1;
}

.release-bullet {
  margin-left: 8px;
}

/* ===== NOTIFICATION STYLES ===== */

.evo-notification {
  text-align: center;
  font-size: 11pt;
  font-weight: bold;
  color: #333;
}

.evo-notification-title {
  margin-bottom: 10px;
}

.evo-notification-message {
  color: #0066cc;
}

.evo-notification-message a {
  color: #0066cc !important;
  text-decoration: underline;
}

/* ===== ALERT BANNER ===== */

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  margin: 20px auto;
  max-width: 1200px;
  background: var(--warning-bg);
  border: 2px solid var(--warning-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(241, 211, 139, 0.25);
}

.alert-icon {
  flex-shrink: 0;
  color: var(--warning-heading);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-icon i {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

.alert-content {
  flex: 1;
  color: var(--text-dark);
}

.alert-content strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--warning-heading);
  margin-bottom: 6px;
}

.alert-message {
  font-size: 15px;
  line-height: 1.6;
  color: #4a3800;
}

.alert-message hr {
  border: none;
  border-top: 1px solid var(--warning-border);
  margin: 12px 0;
  opacity: 0.6;
}

/* ===== RESPONSIVE BREAKPOINTS (Dashboard Template) ===== */

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 1fr;
    margin-top: 20px;
    padding: 0 20px 20px;
  }

  .right-column {
    grid-template-columns: 1fr 1fr;
  }

  .three-col-grid {
    grid-template-columns: 1fr;
  }

  .three-col-grid > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .dashboard {
    margin-top: 16px;
    padding: 0 16px 16px;
  }

  .right-column {
    grid-template-columns: 1fr;
  }

  .three-col-grid > div:last-child {
    grid-template-columns: 1fr;
  }

  .config-table-header {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .acd-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .acd-row > div:last-child {
    text-align: center !important;
  }
}

/* ===== REUSABLE COMPONENTS (2026 Enhancement) ===== */

/* Summary Chips - For displaying key metrics */
.summary-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: white;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chip-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f67b3;
}

.chip-label {
  font-size: 12px;
  font-weight: 600;
  color: #61708a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Issue Chips - For displaying warnings/alerts */
.issue-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.issue-chip:hover {
  background: #fee2e2;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
  transform: translateY(-2px);
}

.issue-chip .chip-value {
  color: #dc2626;
}

.issue-chip .chip-label {
  color: #991b1b;
}

/* Enhanced Clickable Rows */
.acd-row {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.acd-row:hover {
  color: inherit;
  background: #f0f7ff !important;
  border-color: #bdd9f2 !important;
  box-shadow: 0 4px 12px rgba(15, 103, 179, 0.12) !important;
  transform: translateY(-1px);
}

/* Evo Sheet Rows - For software release notifications */
.evo-row {
  display: grid;
  grid-template-columns: 120px 150px 1fr;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.evo-row:hover {
  color: inherit;
  background: #f0f7ff !important;
  border-color: #bdd9f2 !important;
  box-shadow: 0 4px 12px rgba(15, 103, 179, 0.12) !important;
  transform: translateY(-1px);
}

/* Report Link Enhanced Hover Effects */
.report-link {
  transition: all 0.2s ease;
}

.report-link:hover {
  background: #f0f7ff !important;
  border-color: #bdd9f2 !important;
  box-shadow: 0 4px 12px rgba(15, 103, 179, 0.12) !important;
  transform: translateX(3px);
}

/* Label Bars - For section headers */
.label-bar {
  background: linear-gradient(135deg, #e3f2fd, #f0f7ff);
  padding: 10px 16px;
  border-radius: 8px;
  border-left: 4px solid #0f67b3;
  font-size: 13px;
  font-weight: 700;
  color: #1d4463;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Icon Buttons - Reusable icon button containers */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border: 1px solid #d1e6f2;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--primary-blue) !important;
}

.icon-btn i {
  display: flex;
  color: var(--primary-blue);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary-blue) !important;
  stroke-width: 2.2;
  fill: none;
}

.icon-btn:hover {
  background: #f0f7ff;
  border-color: #0f67b3;
  box-shadow: 0 4px 8px rgba(15, 103, 179, 0.15);
  transform: translateY(-1px);
}

/* Customer Grid Layout - Modern card-based display for main_menu.asp */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.customer-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(10, 53, 91, 0.08);
  overflow: hidden;
  max-width: none;
}

.customer-card .card-header.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start !important;
  padding: 16px 24px;
}

.customer-card .card-header h2 {
  font-size: 18px;
  margin: 0;
  text-align: left !important;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.customer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 53, 91, 0.15);
  border-color: var(--primary-blue);
}

.customer-logo-area {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
}

.customer-logo-area img {
  max-width: 100%;
  max-height: 85px;
  object-fit: contain;
  transition: transform 0.2s ease;
  border-radius: 8px;
}

.customer-card:hover .customer-logo-area img {
  transform: scale(1.05);
}

.customer-card-footer {
  border-top: 1px solid var(--border-soft);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
}

.customer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card-footer .icon-btn {
  flex-shrink: 0;
}

/* Section headers for customer groups */
.customer-section-header {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  padding: 16px 0 8px 0;
  border-bottom: 2px solid var(--border);
  margin-top: 16px;
}

.customer-section-header:first-child {
  margin-top: 0;
}

/* Page Header Bar - Filter and Actions */
.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.page-header-bar.centered {
  justify-content: center;
}

.filter-form {
  margin: 0;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-container label {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-heading);
  white-space: nowrap;
}

.filter-select {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-heading);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
  max-width: 220px;
}

.filter-select:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(15, 103, 179, 0.1);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(15, 103, 179, 0.1);
}

/* Compact Primary Button - for header/toolbar usage */
.primary-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: auto;
  height: auto;
  padding: 10px 20px;
  text-decoration: none;
}

.primary-btn-compact i {
  width: 18px;
  height: 18px;
}

.primary-btn-compact svg {
  stroke: white;
  stroke-width: 2.5;
}

/* ===== DOCUMENT LIST PAGE STYLES ===== */

.page-shell {
  padding: 28px;
  width: 90%;
  margin: 0 auto;
}

/* Page header with title and actions */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  color: var(--text-heading);
}

.page-header p {
  margin: 0;
  color: #3d4f63;
  font-size: 15px;
  font-weight: 500;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Notice/info card - extends .card */
.notice-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 18px;
}

.notice-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.notice-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Filter card with grid layout */
.filter-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 18px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
}

.filter-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}

.filter-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
}

.filter-field select:hover {
  border-color: var(--primary-blue);
}

.filter-field select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(15, 103, 179, 0.1);
}

/* Table card component */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}

.table-toolbar strong {
  color: var(--text);
  font-size: 15px;
}

.table-toolbar span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

/* Data table styling - general purpose table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead {
  background: #f6f9fc;
}

.data-table th {
  text-align: left;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

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

.data-table td a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.data-table td a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Document table styling */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

/* Fixed column widths for alignment across cards */
.doc-table th:nth-child(1),
.doc-table td:nth-child(1) {
  width: 20%;
}

.doc-table th:nth-child(2),
.doc-table td:nth-child(2) {
  width: 12%;
}

.doc-table th:nth-child(3),
.doc-table td:nth-child(3) {
  width: 10%;
}

.doc-table th:nth-child(4),
.doc-table td:nth-child(4) {
  width: 35%;
}

.doc-table th:nth-child(5),
.doc-table td:nth-child(5) {
  width: 6%;
}

.doc-table th:nth-child(6),
.doc-table td:nth-child(6) {
  width: 10%;
}

.doc-table th:nth-child(7),
.doc-table td:nth-child(7) {
  width: 7%;
}

.doc-table thead {
  background: #f6f9fc;
}

.doc-table th {
  text-align: left;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.doc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

.doc-table tbody tr {
  transition: background 0.15s ease;
}

.doc-table tbody tr:hover {
  background: #f8fbfd;
}

.doc-table td a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.doc-table td a:hover {
  text-decoration: underline;
}

.doc-table tr.internal-only {
  background: #e8eaed;
  border-left: 3px solid #9aa5b1;
}

.doc-table tr.internal-only td {
  color: #4a5568;
  font-style: italic;
}

.doc-table tr.internal-only:hover {
  background: #dfe2e6;
}

/* Warning table for parts without documents */
.table-card.warning-card {
  border-color: #f97316;
  border-width: 2px;
  background: #fff7ed;
}

.table-card.warning-card .table-toolbar {
  background: #fed7aa;
  border-bottom-color: #fb923c;
}

.table-card.warning-card .table-toolbar strong,
.table-card.warning-card .table-toolbar span {
  color: #9a3412;
}

/* Warning table column widths */
.warning-table th:nth-child(1),
.warning-table td:nth-child(1) {
  width: 12%;
}

.warning-table th:nth-child(2),
.warning-table td:nth-child(2) {
  width: 15%;
}

.warning-table th:nth-child(3),
.warning-table td:nth-child(3) {
  width: 63%;
}

.warning-table th:nth-child(4),
.warning-table td:nth-child(4) {
  width: 10%;
}

/* Program divider rows */
.warning-table tr.program-divider {
  background: #f97316;
  border-top: 2px solid #ea580c;
}

.warning-table tr.program-divider td {
  padding: 12px 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 2px solid #ea580c;
}

.warning-table tr.program-divider .program-count {
  font-weight: 400;
  opacity: 0.9;
  font-size: 13px;
}

.warning-table tr.program-divider-end {
  height: 8px;
  background: transparent;
}

.warning-table tr.program-divider-end td {
  padding: 0;
  border: none;
}

.warning-table tr.program-divider:hover {
  background: #f97316;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .filter-card {
    grid-template-columns: 1fr 1fr;
  }

  .filter-card .filter-field:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .filter-card {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
  }

  .filter-card .filter-field:last-child button {
    width: 100%;
  }
}

/* ===================================================================
   POPUP WINDOW STYLES
   Reusable styles for all popup windows with modern blue gradient
   =================================================================== */

/* Popup body background */
body.popup-window {
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #7dd3fc 0%, #93c5fd 100%);
  min-height: 100vh;
  font-family: Arial, sans-serif;
}

/* Main container for popup content */
.popup-container {
  max-width: 700px;
  margin: 0 auto;
}

.popup-container.wide {
  max-width: 900px;
}

.popup-container.narrow {
  max-width: 500px;
}

/* Popup header section */
.popup-header {
  margin-bottom: 15px;
}

.popup-header h2 {
  margin: 0 0 8px 0;
  color: #1d3550;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-header h2 i,
.popup-header h2 svg {
  width: 24px;
  height: 24px;
}

/* Info/instruction card with amber/orange theme */
.info-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 15px;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

.info-card strong {
  color: #78350f;
}

/* Success info card (green) */
.info-card.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.info-card.success strong {
  color: #14532d;
}

/* Warning info card (red) */
.info-card.warning {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.info-card.warning strong {
  color: #7f1d1d;
}

/* Main form card */
.form-card {
  background: white;
  border: 1px solid #dbe7f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 15px;
}

/* Form row with label on left, input on right */
.popup-container .form-row {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  align-items: start;
}

.popup-container .form-row.compact {
  margin-bottom: 10px;
}

.popup-container .form-row.full-width {
  grid-template-columns: 1fr;
}

.popup-container .form-row label {
  text-align: right;
  padding-top: 10px;
  font-weight: 700;
  color: #60758a;
  font-size: 14px;
}

.popup-container .form-row.full-width label {
  text-align: left;
  padding-top: 0;
  margin-bottom: 6px;
}

.popup-container .form-row .required {
  color: #dc2626;
  margin-right: 3px;
}

/* Form inputs */
.popup-container .form-row input[type="text"],
.popup-container .form-row input[type="email"],
.popup-container .form-row input[type="number"],
.popup-container .form-row input[type="date"],
.popup-container .form-row input[type="password"],
.popup-container .form-row input[type="file"],
.popup-container .form-row textarea,
.popup-container .form-row select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd9e5;
  border-radius: 10px;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.popup-container .form-row select {
  background: white;
}

.popup-container .form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.popup-container .form-row input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

/* File input styling */
.file-info {
  font-size: 13px;
  color: #60758a;
  margin-top: 8px;
}

/* Submit/action row */
.submit-row {
  margin-top: 18px;
  text-align: center;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.submit-row.align-left {
  justify-content: flex-start;
}

.submit-row.align-right {
  justify-content: flex-end;
}

/* Primary submit button */
.btn-submit {
  background: #2176b9;
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 32px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(33, 118, 185, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-submit:hover {
  background: #1c67a3;
  box-shadow: 0 4px 12px rgba(33, 118, 185, 0.4);
}

.btn-submit i,
.btn-submit svg {
  width: 16px;
  height: 16px;
}

/* Primary Add button - prominent blue button for Add actions */
.btn-add-primary {
  background: #1a659e;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(26, 101, 158, 0.2);
}

.btn-add-primary:hover {
  background: #15507a;
  box-shadow: 0 4px 12px rgba(26, 101, 158, 0.3);
  transform: translateY(-1px);
}

.btn-add-primary:active {
  transform: translateY(0);
}

.btn-add-primary i,
.btn-add-primary svg {
  width: 18px;
  height: 18px;
}

/* Secondary button for popups */
.btn-popup-secondary {
  background: #eef6fc;
  color: #2176b9;
  border: 0;
  border-radius: 12px;
  padding: 12px 32px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-popup-secondary:hover {
  background: #dbeafe;
}

.btn-popup-secondary i,
.btn-popup-secondary svg {
  width: 16px;
  height: 16px;
}

/* Cancel/close button */
.btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: 0;
  border-radius: 12px;
  padding: 12px 32px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-cancel:hover {
  background: #e5e7eb;
  color: #4b5563;
}

/* Popup tables */
.popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.popup-table thead {
  background: #f6f9fc;
}

.popup-table th {
  text-align: left;
  padding: 12px 14px;
  color: #60758a;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #dbe7f0;
}

.popup-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f6;
}

.popup-table tbody tr:hover {
  background: #f8fbfd;
}

.popup-table a {
  color: #2176b9;
  text-decoration: none;
  font-weight: 600;
}

.popup-table a:hover {
  text-decoration: underline;
}

/* Icon buttons in tables */
.icon-btn {
  color: #60758a;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #fee2e2;
  transform: scale(1.05);
}

.icon-btn.danger {
  color: #dc2626;
}

.icon-btn i {
  font-size: 14px;
  color: #dc2626;
}

.icon-btn.danger:hover {
  color: #b91c1c;
}

/* Popup responsive adjustments */
@media (max-width: 768px) {
  .popup-container {
    max-width: 100%;
    padding: 10px;
  }

  .popup-container .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .popup-container .form-row label {
    text-align: left;
    padding-top: 0;
  }

  .submit-row {
    flex-direction: column;
  }

  .submit-row button {
    width: 100%;
  }
}

/* ===================================================================
   DOCUMENT ACCESS USER MANAGEMENT STYLES
   Modern card-based layout for managing user document permissions
   =================================================================== */

/* Toggle Switch Component */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.switch {
  position: relative;
  width: 50px;
  height: 28px;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #94a3b8;
  border-radius: 100px;
  transition: 0.3s;
  border: 2px solid #cbd5e1;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background: var(--primary-blue);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

/* User Access Management Grid */
.user-access-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Role Selection Cards */
.role-selection-panel {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 24px;
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-card {
  display: grid;
  grid-template-columns: 1fr 22px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 5px 16px rgba(8, 55, 93, 0.06);
  position: relative;
}

.role-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  transition: background 0.16s ease;
}

.role-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong, #cbd9e5);
  background: #f8fcff;
  box-shadow: 0 10px 24px rgba(8, 55, 93, 0.10);
}

.role-card:hover::before {
  background: var(--primary-blue);
}

.role-card.active {
  border-color: var(--primary-blue);
  background: #eff6ff;
}

.role-card.active::before {
  background: var(--primary-blue);
}

.role-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card-title {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  color: var(--text-heading, #1d4463);
  font-weight: 600;
}

.role-card-subtitle {
  display: block;
  color: var(--text-muted, #5f7e95);
  line-height: 1.35;
  font-size: 13px;
}

.role-card-meta {
  font-size: 12px;
  color: var(--primary-blue);
  font-weight: 600;
}

.role-card .chevron {
  color: #7b91a8;
  flex-shrink: 0;
}

.role-card > span {
  text-align: left;
}

/* Permissions Preview Panel */
.permissions-preview {
  background: #f8fafc;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  max-height: 600px;
  overflow-y: auto;
}

.permissions-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.permissions-preview-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.permission-badge {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.permission-section {
  margin-bottom: 16px;
}

.permission-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  margin-bottom: 3px;
}

.permission-item.allowed {
  color: #166534;
  background: rgba(22, 101, 52, 0.05);
}

.permission-item.allowed i {
  color: #16a34a;
}

.permission-item.denied {
  color: #991b1b;
  opacity: 0.75;
  background: rgba(153, 27, 27, 0.05);
}

/* Customer Access Table Enhancement */
.customer-access-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.customer-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  padding-left: 36px;
  min-width: 250px;
}

/* Access Table Styling */
.access-table {
  width: 100%;
  border-collapse: collapse;
}

.access-table thead {
  background: #f8fafc;
}

.access-table th {
  text-align: left;
  padding: 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.access-table td {
  padding: 18px 16px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
}

.access-table tbody tr {
  transition: background 0.2s;
}

.access-table tbody tr:hover {
  background: #f8fafc;
}

.access-table tbody tr.highlighted {
  background: #fffbeb;
}

.access-table .customer-name {
  width: 220px;
  max-width: 220px;
  vertical-align: top;
}

.access-table .actions-cell {
  width: 140px;
  text-align: right;
  vertical-align: top;
}

.access-table .icon-btn-remove {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.access-table .icon-btn-remove:hover {
  background: #fee2e2;
  transform: scale(1.05);
}

.access-table .customer-logo-area {
  min-height: 60px;
  padding: 8px;
  background: none;
  border-bottom: none;
  justify-content: flex-start;
}

.access-table .customer-logo-area img {
  max-height: 85px;
}

/* Field Groups */
.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-align: left;
}

.field-group input[type="text"],
.field-group input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

.readonly-value {
  background: #e8edf3;
  border: 1px solid #d1dce6;
  border-radius: 10px;
  padding: 12px 14px;
  color: #5f7e95;
  font-size: 14px;
  font-style: italic;
  cursor: not-allowed;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.field-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.readonly-field {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 14px;
  color: #334155;
  font-size: 14px;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-full-width {
  width: 100%;
  justify-content: center;
}

/* Info Box */
.info-box {
  background: #fff8e8;
  border: 1px solid #f1d38b;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}

.info-box i {
  color: #8a5a00;
  font-size: 20px;
  flex-shrink: 0;
}

.info-box-content {
  flex: 1;
}

.info-box-content strong {
  display: block;
  margin-bottom: 4px;
  color: #8a5a00;
}

/* Responsive Design for User Access */
@media (max-width: 1200px) {
  .user-access-grid {
    grid-template-columns: 1fr;
  }

  .role-selection-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .field-row-split {
    grid-template-columns: 1fr;
  }

  .customer-tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input {
    width: 100%;
  }
}

/* ===================================================================
   CONSOLIDATED REUSABLE COMPONENTS (2026)
   Styles moved from individual pages to reduce duplication
   =================================================================== */

/* Checkbox List Component */
.checkbox-list {
  background: white;
  border: 1px solid #dbe7f0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.checkbox-header {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f6;
  font-weight: 600;
  color: #20364d;
  font-size: 14px;
}

.checkbox-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-item:last-child {
  border-bottom: none;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  margin: 0;
  flex: 1;
  text-align: left;
}

.checkbox-item input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-item input[type="checkbox"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* All Locations Section */
.all-locations-section {
  background: #eff6ff;
  padding: 16px 20px;
  border-bottom: 1px solid #dbeafe;
}

.all-locations-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.all-locations-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.all-locations-checkbox label {
  cursor: pointer;
  margin: 0;
  font-weight: 600;
  color: #1e40af;
}

.all-locations-help {
  font-size: 12px;
  color: #64748b;
}

/* Email Grid Component */
.email-grid-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.email-grid-header {
  display: grid;
  grid-template-columns: 40px 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.email-header-num {
  text-align: center;
}

.email-header-col {
  text-align: left;
}

.email-grid-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr;
  gap: 12px;
  padding: 10px 16px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}

.email-grid-row:last-child {
  border-bottom: none;
}

.email-grid-row:hover {
  background: #f8fafc;
}

.email-row-num {
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
  font-size: 14px;
}

.email-input-cell input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.email-input-cell input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.email-input-cell input::placeholder {
  color: #94a3b8;
}

/* Program Select Row */
.program-select-row {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.program-select-row label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.program-select-row select {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  height: 44px;
}

/* Customer Subheader */
.customer-subheader {
  font-size: 16px;
  color: #64748b;
  margin-top: -8px;
  margin-bottom: 24px;
  font-weight: 500;
}

/* Access Options (Request Access Path) */
.access-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.access-option {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid #d7e4ee;
  border-radius: 12px;
  background: #f9fcff;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s, background 0.2s;
}

.access-option:hover {
  border-color: #1b74bd;
  background: #f4faff;
  box-shadow: 0 8px 20px rgba(27, 116, 189, 0.10);
}

.access-option:active {
  transform: translateY(1px);
}

.access-badge {
  min-width: 180px;
  text-align: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: #0f67b3;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.access-text {
  flex: 1;
}

.access-text h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #244866;
}

.access-text p {
  margin: 0;
  font-size: 15px;
  color: #5f7e95;
  line-height: 1.5;
}

/* Notice Banner (variant of info-card) */
.notice-banner {
  margin-bottom: 26px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff8cc;
  border: 1px solid #e5cf69;
  color: #5b4a00;
  line-height: 1.5;
  font-size: 15px;
}

.notice-banner strong {
  color: #3f3200;
}

.notice-banner a {
  color: #8a5a00;
  font-weight: 700;
  text-decoration: underline;
}

/* Card Grid Layouts (for add_documentaccess_group.asp and similar) */
.card-grid-row-1-wide {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: none;
}

.card-grid-row-1-wide > .card:first-child {
  grid-column: 1 / 2;
}

.card-grid-row-1-wide > .card:last-child {
  grid-column: 2 / 5;
}

.card-grid-row-2 {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: none;
}

.card-grid-row-2 > .card:first-child {
  grid-column: 1 / 2;
}

.card-grid-row-2 > .card:last-child {
  grid-column: 2 / 4;
}

/* Wide Page Shell (for specific pages needing more width) */
.page-shell.wide {
  max-width: 80vw !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 2rem !important;
}

@media (max-width: 1600px) {
  .page-shell.wide {
    max-width: 90vw !important;
  }
}

@media (max-width: 1400px) {
  .page-shell.wide {
    max-width: 95vw !important;
  }
}

/* Consolidated Responsive Breakpoints */
@media (max-width: 1200px) {
  .card-grid-row-1-wide,
  .card-grid-row-2 {
    grid-template-columns: 1fr;
  }

  .card-grid-row-1-wide > .card:first-child,
  .card-grid-row-1-wide > .card:last-child,
  .card-grid-row-2 > .card:first-child,
  .card-grid-row-2 > .card:last-child {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .email-grid-header,
  .email-grid-row {
    grid-template-columns: 30px 1fr;
    gap: 8px;
  }

  .email-grid-header .email-header-col:first-of-type,
  .email-grid-row .email-input-cell:first-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .access-option {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .access-badge {
    min-width: auto;
    width: 100%;
  }
}

/* ===================================================================
   QUICK ACTIONS BAR (User Access Management)
   Reusable component for bulk permission actions
   =================================================================== */

.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.quick-actions-label {
  font-size: 13px;
  font-weight: 700;
  color: #60758a;
  white-space: nowrap;
}

.quick-actions-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
}

.quick-action-btn.full {
  background: white;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.quick-action-btn.full:hover {
  background: var(--primary-blue);
  color: white;
}

.quick-action-btn.read {
  background: white;
  color: #c45a00;
  border-color: #f59e0b;
}

.quick-action-btn.read:hover {
  background: #fff7ed;
}

.quick-action-btn.none {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.quick-action-btn.none:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

/* ===================================================================
   MODERN TOOLTIP SYSTEM (2026)
   Reusable tooltip component for labels and help text
   Uses dotted underline style for clean, minimal UI
   =================================================================== */

.tooltip-trigger {
  position: relative;
  display: inline-block;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--primary-blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: help;
}

.tooltip-trigger:hover {
  text-decoration-color: var(--primary-blue-hover);
}

.tooltip-trigger .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  white-space: normal;
  min-width: 200px;
  max-width: 600px;
  width: max-content;
  line-height: 1.4;
  text-align: left;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: normal;
}

.tooltip-trigger .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.tooltip-trigger:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* For multi-line tooltips */
.tooltip-text.multiline {
  white-space: normal;
  max-width: 600px;
  line-height: 1.4;
}

/* Ensure cards and all nested elements allow tooltip overflow */
.card,
.card > *,
.card section,
.card div,
section.card,
section.card > *,
.panel-heading,
.form-row {
  overflow: visible !important;
}

/* Specifically for customer configuration page */
body .card.customer-card,
body .card.customer-card > *,
body .card.customer-card section,
body .card.customer-card section > *,
body .card.customer-card div {
  overflow: visible !important;
}

/* Customer Configuration Sub-Cards Styling */
.customer-card .card .form-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.customer-card .card .form-row label {
  text-align: left !important;
  font-size: 14px;
  font-weight: 600;
  color: #60758a;
  padding-top: 8px;
  margin-bottom: 0;
}

.customer-card .card .toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  margin-bottom: 8px;
}

.customer-card .card .toggle-row label {
  text-align: left !important;
}

/* Selectable Button Component - for button grids with active states */
.selectable-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  text-align: center;
}

.selectable-btn:hover {
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 103, 179, 0.15);
}

.selectable-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.selectable-btn.active:hover {
  background: #e3f0fb;
  border-color: var(--primary-blue-hover);
  color: var(--primary-blue-hover);
}

.selectable-btn i {
  font-size: 20px;
}

.selectable-btn div {
  font-weight: 600;
}

/* ===================================================================
   FORM GRID & GROUP COMPONENTS (2026)
   Standardized form layout patterns for customer configuration
   =================================================================== */

/* Form Grid - 2-column form layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  text-align: left !important;
  font-size: 14px;
  font-weight: 600;
}

/* Toggle List - Toggle switches with descriptions */
.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.toggle-list .toggle-row {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.toggle-list .toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-weight: 600;
  font-size: 14px;
}

.toggle-description {
  color: var(--muted);
  font-size: 13px;
  font-weight: normal;
}

/* Selection Grid - Grid for selectable button components */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.selection-grid.single-row {
  display: flex;
  gap: 12px;
}

.selection-grid.single-row .selectable-btn {
  flex: 1;
}

.selection-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

/* Card Description - Subtitle under card title */
.card-description {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Section Label - Subsection headers within cards */
.section-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 12px;
}

/* ===================================================================
   SOFTWARE RELEASES PAGE LAYOUT (Card-based)
   =================================================================== */

.releases-container {
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Filter section */
.filters-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr;
  gap: 12px 20px;
  margin-bottom: 28px;
  align-items: center;
}

.filters-bar label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
  white-space: nowrap;
}

.filters-bar select {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: white;
  font-size: 14px;
  color: var(--text);
  min-width: 200px;
}

.filters-bar select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(15, 103, 179, 0.1);
}

@media (max-width: 1400px) {
  .filters-bar {
    grid-template-columns: auto 1fr auto 1fr;
  }
}

@media (max-width: 900px) {
  .filters-bar {
    grid-template-columns: auto 1fr;
  }
}

/* Aircraft section grouping */
.aircraft-section {
  margin-bottom: 40px;
}

.aircraft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.aircraft-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
}

.aircraft-count {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}

/* Program Card - large container for multiple releases */
.program-card {
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  border-radius: 20px;
  border: 3px solid #c5d9ed;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(10, 53, 91, 0.12);
  transition: all 0.2s ease;
}

.program-card:hover {
  box-shadow: 0 6px 24px rgba(10, 53, 91, 0.16);
  border-color: #a8c5e0;
}

.program-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(10, 53, 91, 0.06);
}

.program-info {
  flex: 1;
}

.program-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.program-title svg {
  width: 24px;
  height: 24px;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.program-meta {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.program-meta-item {
  display: flex;
  gap: 6px;
}

.program-meta-label {
  font-weight: 600;
  color: var(--text-heading);
}

.program-actions {
  display: flex;
  gap: 8px;
}

/* Release cards within program - smaller, nested appearance */
.program-card .release-card {
  margin-bottom: 16px;
  border: 2px solid #e3edf7;
  box-shadow: 0 2px 8px rgba(10, 53, 91, 0.06);
  background: white;
  padding: 18px;
  transition: all 0.2s ease;
}

.program-card .release-card:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 4px 14px rgba(15, 103, 179, 0.12);
  transform: translateX(4px);
}

.program-card .release-card:last-child {
  margin-bottom: 0;
}

/* Make release cards more compact within programs */
.program-card .release-top {
  margin-bottom: 16px;
  gap: 16px;
}

.program-card .release-title-row {
  gap: 10px;
  margin-bottom: 8px;
}

.program-card .release-id {
  font-size: 18px;
}

.program-card .release-note {
  font-size: 14px;
  margin-bottom: 0;
}

.program-card .release-grid {
  gap: 24px;
  margin-top: 16px;
  grid-template-columns: 0.7fr 1.3fr;
}

@media (max-width: 1200px) {
  .program-card .release-grid {
    grid-template-columns: 1fr;
  }
}

.program-card .release-section-title {
  font-size: 14px;
  margin-bottom: 12px;
}

/* Release Card */
.release-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(10, 53, 91, 0.06);
  transition: all 0.2s ease;
}

.release-card:hover {
  box-shadow: 0 4px 20px rgba(10, 53, 91, 0.12);
  border-color: #b8d4ec;
}

/* Release header area */
.release-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 24px;
}

.release-header-content {
  flex: 1;
}

.release-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.release-id {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.release-id a {
  color: var(--primary-blue);
  text-decoration: none;
}

.release-id a:hover {
  text-decoration: underline;
}

/* Status badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.status-badge.planning {
  background: var(--primary-soft);
  color: var(--primary-blue);
}

.status-badge.review {
  background: var(--warning-bg);
  color: var(--warning-heading);
}

.status-badge.approved {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-badge.progress {
  background: #ede9fe;
  color: #7c3aed;
}

.status-badge.released {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-badge.blocked {
  background: var(--older-badge-bg);
  color: var(--older-badge-text);
}

/* Release Type badge - neutral styling */
.release-type-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

/* Release meta row - for Release Type badge + Notes on same line */
.release-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Inline release notes */
.release-note-inline {
  flex: 1;
  font-size: 13px;
  color: #5f7e95;
  line-height: 1.5;
  min-width: 200px;
}

/* Release notes/description */
.release-note {
  max-width: 900px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  font-size: 15px;
}

/* Release metadata */
.release-meta {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.release-meta-item {
  display: flex;
  gap: 6px;
}

.release-meta-label {
  font-weight: 600;
}

/* Release detail grid (2 columns: milestones, software) */
.release-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 1200px) {
  .release-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Section titles inside cards */
.release-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-heading);
}

/* Timeline/Milestones - Original vertical layout */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.timeline-dot.complete {
  background: var(--success-text);
}

.timeline-dot.pending {
  background: var(--primary-blue);
}

.timeline-dot.empty {
  background: #d1d5db;
}

.timeline-content {
  flex: 1;
}

.timeline-label {
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 14px;
  color: var(--text);
}

.timeline-date {
  font-size: 13px;
  color: var(--muted);
}

/* Compact Milestone Rows - for software releases page */
.milestone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.milestone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.milestone-dot.complete {
  background: var(--success-text);
}

.milestone-dot.pending {
  background: var(--primary-blue);
}

.milestone-dot.empty {
  background: #d1d5db;
}

.milestone-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  min-width: 110px;
}

.milestone-date {
  font-size: 13px;
  color: var(--muted);
}

/* Software parts table */
.parts-table {
  width: 100%;
  border-collapse: collapse;
}

.parts-table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.parts-table td {
  padding: 10px 8px 10px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--text);
}

.parts-table tr:first-child td {
  border-top: none;
  padding-top: 0;
}

.parts-table a {
  color: var(--primary-blue);
  text-decoration: none;
}

.parts-table a:hover {
  text-decoration: underline;
}

/* Action links at bottom of card */
.release-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.action-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 14px;
  transition: color 0.2s ease;
}

.action-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

.action-link svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Edit button in release card */
.release-edit-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.release-edit-btn:hover {
  background: var(--secondary-btn-bg);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.release-edit-btn img {
  width: 16px;
  height: 16px;
}

/* ===== EDIT PROGRAM PAGE STYLES ===== */

/* Three-card equal-width row */
.card-grid-row-3-equal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .card-grid-row-3-equal {
    grid-template-columns: 1fr;
  }
}

/* Compact card variant */
.card.compact {
  padding: 18px;
}

.card.compact .panel-heading h3 {
  font-size: 16px;
  margin: 0;
}

/* Vertical button group within cards */
.card-button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.card-button-group .compact-btn {
  width: 100%;
  justify-content: center;
}

/* Document tabs */
.doc-tabs {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.doc-tabs .tab {
  display: inline-block;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.doc-tabs .tab:hover {
  color: var(--text-heading);
  background: var(--border-soft);
}

.doc-tabs .tab.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* MDM Warning Banner */
.warning-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.warning-banner img {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.warning-banner a {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* Program document table */
.program-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.program-doc-table th {
  text-align: left;
  padding: 12px 10px;
  background: #f6f9fc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}

.program-doc-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.program-doc-table tr:hover {
  background: #f8fbfd;
}

.program-doc-table a {
  color: var(--primary-blue);
  text-decoration: none;
}

.program-doc-table a:hover {
  text-decoration: underline;
}

.program-doc-table select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.program-doc-table select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* Three-column form grid variant */
.form-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
  .form-grid.three-col {
    grid-template-columns: 1fr;
  }
}

/* Spinning icon animation for loading states */
.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
