.env-edit-help {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #eef2ff;
    border: 1px dashed #6366f1;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #3730a3;
}

/* ================================================================
   Cx Version Tracker - Phase 1 Styles
   ================================================================ */

:root {
    --primary-color: #0078d4;
    --secondary-color: #106ebe;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --success-color: #107c10;
    --warning-color: #ff8c00;
    --danger-color: #d13438;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

.env-summary-container {
    display: grid;
    gap: 1rem;
}

.env-summary {
    background: #f8fafd;
    border: 1px solid #dbe5ff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 4px rgba(17, 24, 39, 0.06);
}

.env-summary + .env-summary {
    margin-top: 1rem;
}

.env-summary__active {
    border-color: #31c48d;
    background: #f1fdf6;
}

.env-summary__inactive {
    border-color: #fbbf24;
    background: #fffbeb;
}

.env-summary h4 {
    margin: 0 0 0.5rem;
    color: #1f3a8a;
}

.env-summary ul {
    margin: 0;
    padding-left: 1.2rem;
}

.env-summary ul ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    list-style-type: disc;
}

.env-summary__modules {
    list-style: none;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.env-summary__label {
    font-weight: 600;
    min-width: 90px;
    color: #1f3a8a;
}

.env-summary__module-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.env-summary__module-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    line-height: 1.4;
}

.env-summary__module-name {
    flex: 1 1 auto;
    font-weight: 600;
    color: #1f2937;
    min-width: 0;
}

.env-summary__module-status {
    flex: 0 0 auto;
    font-size: 0.85rem;
    color: #475569;
}

.env-summary__module-item--empty {
    font-style: italic;
    color: #6b7280;
}

.env-summary li {
    margin-bottom: 0.35rem;
}

.env-card-header {
    margin-bottom: 1rem;
}
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

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

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

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.link-button {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}
.link-button:hover {
    text-decoration: underline;
}

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
    background-color: var(--card-background);
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 20px;
}

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

/* ================================================================
   COMMON COMPONENTS
   ================================================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #0e6b0e;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #a92024;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background-color: var(--warning-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.status-cell {
    vertical-align: middle;
}

.status-badges {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-danger {
    border: 2px solid var(--danger-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ================================================================
   PAGES
   ================================================================ */

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
}

/* Welcome Page */
.welcome-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 0;
}

.welcome-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: stretch;
}

.welcome-hero {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.welcome-hero h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin: 0;
}

.welcome-hero p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.welcome-lede {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f2937;
}

.welcome-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.welcome-badge {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.welcome-hero .btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.welcome-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.welcome-card {
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.welcome-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary-color);
}

.welcome-card p,
.welcome-card ul {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.welcome-card ul {
    padding-left: 1.1rem;
}

.welcome-card li + li {
    margin-top: 0.35rem;
}

.welcome-footer {
    align-self: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(221, 243, 228, 0.6));
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 640px;
}

.welcome-footer h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.welcome-footer p {
    margin: 0;
    color: #1f2937;
    font-weight: 500;
}

@media (max-width: 768px) {
    .welcome-hero {
        padding: 2rem;
    }
}

/* Home Dashboard */
.dashboard-home {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.dashboard-hero {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.summary-card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card {
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.metric-card-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
}

.metric-card-value {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.metric-card-body p {
    margin-bottom: 0.75rem;
}

.dashboard-meta {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.comparison-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.comparison-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 0.05em;
}

.comparison-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.comparison-meta {
    font-size: 0.85rem;
    color: #555;
}

.distribution-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.distribution-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.distribution-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.distribution-value {
    font-size: 0.95rem;
    color: #444;
}

.distribution-bar {
    height: 8px;
    width: 100%;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.distribution-bar-fill {
    display: block;
    height: 100%;
    background: var(--primary-color);
    border-radius: inherit;
}

.standings-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.standing {
    background: var(--card-background);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.standing-positive {
    border-left-color: var(--success-color);
}

.standing-negative {
    border-left-color: var(--danger-color);
}

.standing-neutral {
    border-left-color: var(--border-color);
}

.insights-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-actions {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-action {
    background: var(--card-background);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action .btn {
    align-self: flex-start;
}

.dashboard-loading {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3rem 1.5rem;
    text-align: center;
}

.muted-text {
    color: #666;
}

.adoption-score-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: flex-start;
    padding: 1.75rem;
    border-left: 6px solid var(--border-color);
}

.adoption-score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 64px;
    text-align: center;
}

.adoption-score-message h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.adoption-score-message p {
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
}

.adoption-score-none {
    border-left-color: #d1d5db;
}

.adoption-score-limited {
    border-left-color: #f97316;
}

.adoption-score-growing {
    border-left-color: #facc15;
}

.adoption-score-comprehensive {
    border-left-color: #22c55e;
}

@media (max-width: 600px) {
    .metric-card-value {
        font-size: 1.5rem;
    }

    .comparison-highlights {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Login & Authentication Pages */
.login-section, .verify-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 2rem 0;
}

.login-card, .verify-card, .error-card {
    background: var(--card-background);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
}

    .checkbox-inline {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .checkbox-inline input[type="checkbox"] {
        margin-top: 4px;
    }

.login-card h2, .verify-card h2, .error-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.login-card p, .verify-card p, .error-card p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #666;
}

.login-card .form-group {
    margin-bottom: 1.5rem;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-card .form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.login-card .form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.success-message {
    background-color: #e7f5e7;
    border: 1px solid var(--success-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.success-message h3 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.success-message p {
    margin: 0.5rem 0;
    text-align: left;
}

.error, .info {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.error {
    background-color: #fde7e7;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.inline-error {
    color: var(--danger-color);
    font-weight: 600;
}

.info {
    background-color: #e7f3ff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Pending Approval */
.pending-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 2rem 0;
}

.info-card {
    background: var(--card-background);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 600px;
    width: 100%;
    border: 2px solid var(--primary-color);
}

.info-card h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.info-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

.info-card .btn {
    margin-top: 1.5rem;
}

/* ================================================================
   FORMS
   ================================================================ */

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-grid div {
    padding: 0.5rem;
}

/* Environment Forms */
.env-form {
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.env-form h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.module-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-item.compact {
    flex-direction: row !important;
}

.module-item strong {
    font-size: 0.9rem;
}

.module-status {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Compact module list with tri-state pill toggle */
.module-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.5rem;
}

.module-item.compact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    gap: 12px;
    width: 100%;
}

.module-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1f36;
    flex: 1 1 auto;
    min-width: 0;
}

.module-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid #cbd5e1;
    background: #f4f4f5;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.module-toggle.state-test {
    background: #fff7ed;
    border-color: #fb923c;
    color: #c2410c;
}

.module-toggle.state-yes {
    background: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
}

.module-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.env-save-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    gap: 0.75rem;
}

.env-details.collapsed .env-fields {
    display: none;
}

.module-category {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.category-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: none;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.category-toggle .chevron {
    font-size: 14px;
}

.pending-pill {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

/* Modal for custom module */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Environment yes/no toggle */
.env-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.env-toggle-label {
    font-weight: 600;
    color: #1a1f36;
}

.env-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid #cbd5e1;
    background: #f4f4f5;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.env-toggle.state-yes {
    background: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
}

.env-pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.pill-live {
    background: #dcfce7;
    color: #166534;
}

.pill-test {
    background: #fff7ed;
    color: #c2410c;
}

.pill-none {
    background: #f1f5f9;
    color: #475569;
}

.pill-me {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

/* Two-column environment layout */
.env-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

/* ================================================================
   ADMIN DASHBOARD
   ================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.approval-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 6px;
}

.approval-item small {
    display: block;
    color: #666;
    font-size: 0.85rem;
}

.approval-actions {
    display: flex;
    gap: 10px;
}

/* ================================================================
   DATA TABLE
   ================================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: var(--primary-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: var(--background-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.copy-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copy-cell__value {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    word-break: break-all;
    color: #1f2937;
}

.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 28px;
}

.copy-link-btn i {
    font-size: 0.85rem;
}

.copy-cell__label {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.login-submit {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.user-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-cell__site {
    font-size: 0.75rem;
    color: #6b7280;
}

.table-actions {
    min-width: 180px;
}

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

.consent-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-checkbox {
    width: 16px;
    height: 16px;
    pointer-events: none;
    accent-color: var(--primary-color);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    background-color: #d1d5db;
    color: #1f2937;
}

.status-pill--approved {
    background-color: rgba(16, 124, 16, 0.15);
    color: var(--success-color);
}

.status-pill--pending {
    background-color: rgba(255, 140, 0, 0.15);
    color: var(--warning-color);
}

.status-pill--disabled {
    background-color: rgba(107, 114, 128, 0.2);
    color: #374151;
}

/* ================================================================
   SEARCH BAR
   ================================================================ */

.search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-height: 44px;
}

.module-dropdown {
    position: relative;
    flex: 0 0 260px;
    min-width: 220px;
    max-width: 320px;
}

.module-dropdown__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 44px;
}

.module-dropdown__list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.module-dropdown__option {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    padding: 2px 6px;
    border-radius: 4px;
}
.module-dropdown__option span {
    min-width: 0;
    line-height: 1.3;
    word-break: break-word;
}
.module-dropdown__option input {
    margin: 0;
    justify-self: start;
    accent-color: #2563eb;
}
.module-dropdown__toggle i {
    font-size: 0.8rem;
    color: #6b7280;
}

.module-dropdown.has-selection .module-dropdown__toggle {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.module-dropdown__label {
    font-weight: 600;
    font-size: 0.85rem;
}

.module-dropdown__summary {
    margin-left: auto;
    font-size: 0.8rem;
    color: #4b5563;
    white-space: nowrap;
}

.module-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 12px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    z-index: 20;
}

.module-dropdown.open .module-dropdown__panel {
    display: block;
}

.module-dropdown__status {
    font-size: 0.85rem;
    color: #6b7280;
    padding: 6px 0;
}

.module-dropdown__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.module-dropdown__footer .btn.btn-link {
    padding: 0;
    font-size: 0.8rem;
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: none;
}

@media (max-width: 720px) {
    .module-dropdown {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* ================================================================
   MODAL
   ================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.consent-modal-content {
    max-width: 640px;
}


.document-modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    padding: 2rem 2.5rem 2rem 2rem;
}

.document-modal-body {
    overflow-y: auto;
    max-height: calc(80vh - 3rem);
    padding-right: 1rem;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.modal-close:hover,
.modal-close:focus {
    color: #1a3da8;
}
.consent-description {
    margin-bottom: 1rem;
}

.consent-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.consent-message {
    min-height: 1.2rem;
    font-size: 0.95rem;
    color: var(--danger-color);
}

.consent-message.error {
    color: var(--danger-color);
}

.consent-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.consent-list li {
    line-height: 1.5;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================================
   NOTIFICATIONS & ALERTS
   ================================================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow-hover);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: var(--success-color);
    color: white;
}

.notification-error {
    background-color: var(--danger-color);
    color: white;
}

.notification-info {
    background-color: var(--primary-color);
    color: white;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-warning {
    background-color: #fff4e5;
    border-color: var(--warning-color);
    color: #663c00;
}

.alert-warning strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.alert ul {
    line-height: 1.8;
}

/* ================================================================
   SUPPORT WIDGET
   ================================================================ */

.support-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: 0 14px 35px rgba(0, 120, 212, 0.35);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    z-index: 2500;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.support-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 120, 212, 0.4);
}

.support-fab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
    font-size: 16px;
}

.support-fab__label {
    font-size: 14px;
}

.support-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 12px;
}

.support-modal__card {
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    padding: 22px;
}

.support-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.support-modal__kicker {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #4f46e5;
    font-weight: 700;
}

.support-modal__sub {
    color: #5f6a86;
    margin-top: 4px;
}

.support-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
}

.support-close:hover {
    color: #111827;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-label {
    font-weight: 700;
    color: #1f2937;
}

.support-input,
.support-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 14px;
}

.support-input:focus,
.support-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
    background: #fff;
}

.support-textarea {
    resize: vertical;
    min-height: 140px;
}

.support-type-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-weight: 600;
    color: #374151;
}

.support-form__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.support-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.support-word-count {
    font-size: 12px;
    color: #6b7280;
}

.support-word-count--warning {
    color: #c2410c;
    font-weight: 700;
}

.support-status {
    min-height: 20px;
    font-size: 14px;
    margin-top: 4px;
    color: #374151;
}

.support-status.success {
    color: var(--success-color);
    font-weight: 700;
}

.support-status.error {
    color: var(--danger-color);
    font-weight: 700;
}

/* ================================================================
   LOADING & ERROR STATES
   ================================================================ */

.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.error-message {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    padding: 1rem;
    border-radius: 6px;
    color: #856404;
}

.warning {
    color: var(--warning-color);
    font-weight: 600;
}

.content-card ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-card ul li {
    margin-bottom: 0.5rem;
}

.content-card hr {
    margin: 2rem 0 1.5rem;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.policy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.policy-table th,
.policy-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.policy-table td {
    vertical-align: top;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }

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

    .search-bar {
        flex-direction: column;
    }

    .search-bar input,
    .search-bar select {
        width: 100%;
    }

    .approval-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .welcome-card {
        padding: 2rem;
    }

    .welcome-card h2 {
        font-size: 1.75rem;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links a {
        margin-left: 0;
    }

    .support-form__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .support-fab {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
    }

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