/* Task Checker Agent Platform - Soft Mint SaaS Theme */

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

:root {
    --bg-primary: #f4fbf7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef6f1;
    --bg-elevated: #ffffff;

    --text-primary: #14332b;
    --text-secondary: #34564d;
    --text-muted: #6b857d;

    --border-subtle: #e6efe9;
    --border-default: #dbe7e1;
    --border-strong: #c3d5cd;

    --accent-primary: #1ea279;
    --accent-hover: #178567;
    --accent-soft: #dff3ea;
    --accent-ink: #0f5a46;

    --success: #1ea279;
    --danger: #c4625f;
    --warning: #c5962b;

    --shadow-sm: 0 8px 20px rgba(20, 90, 70, 0.08);
    --shadow-md: 0 18px 50px rgba(20, 90, 70, 0.14);
    --shadow-lg: 0 34px 90px rgba(20, 90, 70, 0.18);

    --gradient-primary:
        radial-gradient(1100px circle at 10% 10%, rgba(188, 236, 219, 0.75), rgba(244, 251, 247, 0.9) 40%, #f4fbf7 70%),
        radial-gradient(900px circle at 90% 15%, rgba(205, 234, 255, 0.6), rgba(244, 251, 247, 0.2) 55%, transparent 70%);
    --gradient-accent: linear-gradient(120deg, #b6f0d8 0%, #1ea279 65%, #178567 100%);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 40px;

    --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
    --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-primary);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: 0.1px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(500px circle at 12% 18%, rgba(154, 220, 198, 0.4), transparent 60%),
        radial-gradient(420px circle at 82% 12%, rgba(194, 228, 255, 0.45), transparent 62%),
        radial-gradient(680px circle at 50% 90%, rgba(204, 240, 226, 0.55), transparent 70%);
    opacity: 0.9;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, .logo h1, .header-left h1, .modal-header h2, .section-header h3 {
    font-family: var(--font-display);
    letter-spacing: -0.4px;
}

.section {
    min-height: 100vh;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.spinner {
    border: 4px solid var(--border-default);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section .container {
    animation: riseIn 0.7s ease both;
}

.header {
    animation: riseIn 0.6s ease both;
}

/* Auth Section */
.auth-section {
    position: relative;
}

.auth-container {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 0.9fr);
    gap: 48px;
    align-items: center;
    min-height: 100vh;
    background: transparent;
    position: relative;
    padding: 64px 24px;
}

.auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(182, 240, 216, 0.6) 0%, transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(198, 226, 255, 0.45) 0%, transparent 60%);
    pointer-events: none;
}

.auth-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--gradient-accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-text h1 {
    font-size: 26px;
    margin-bottom: 4px;
}

.tagline {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-headline {
    font-size: 40px;
    line-height: 1.1;
    margin: 0;
}

.auth-lede {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.metric-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.metric-card p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-support {
    color: var(--text-muted);
    font-size: 13px;
}

.auth-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-navbar {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(244, 251, 247, 0.92);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
}

.auth-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.auth-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
}

.auth-nav-links {
    display: flex;
    gap: 18px;
}

.auth-nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.auth-nav-links a:hover {
    color: var(--text-primary);
}

.brand-link {
    color: var(--text-primary);
    text-decoration: none;
}

.brand-link:hover {
    color: var(--accent-ink);
}

.auth-pricing {
    margin-top: 32px;
    padding-bottom: 64px;
    display: grid;
    gap: 24px;
}

.auth-pricing-header h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.auth-pricing-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-pricing-card.featured {
    border-color: rgba(30, 162, 121, 0.4);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.auth-pricing-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-pricing-list li::before {
    content: "•";
    color: var(--accent-primary);
    margin-right: 8px;
}

.auth-pricing-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.auth-pricing-link {
    font-size: 12px;
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 42px 40px;
    box-shadow: var(--shadow-md);
    text-align: left;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: riseIn 0.7s ease both;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(140deg, rgba(30, 162, 121, 0.2), transparent 45%);
    pointer-events: none;
}

.auth-card h2 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 28px;
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.auth-form {
    padding: 0;
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-card .auth-note {
    margin: 12px 0 0;
}

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin: 8px 0 12px;
}

.password-reset-dialog {
    max-width: 480px;
}

.features {
    margin-top: 28px;
    text-align: left;
    display: grid;
    gap: 10px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    color: var(--text-secondary);
}

.feature-icon {
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 12px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 20px;
    margin-bottom: 2px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 13px;
}

.user-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    border: 1px solid rgba(30, 162, 121, 0.2);
}

.user-role.super-admin {
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid var(--accent-primary);
}

.user-role.admin {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

/* Dashboard Layout */
.dashboard-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.dashboard-side {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 32px 24px;
    border-right: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.side-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
}

.side-brand .subtitle {
    display: block;
    margin-top: 2px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-link {
    border: 1px solid transparent;
    background: transparent;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
}

.side-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-subtle);
}

.side-link.active {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-color: rgba(30, 162, 121, 0.2);
}

.side-link-muted {
    color: var(--text-muted);
}

.side-user {
    margin-top: auto;
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-main {
    padding: 36px 40px 48px;
}

.dashboard-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-title h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.dashboard-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* User Management */
.user-management-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-default);
}

.user-management-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    /* padding-bottom: 0; */
}

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

.section-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#user-management-modal .modal-body {
    padding: 24px 28px 8px;
}

#user-management-modal form {
    padding: 0;
}

#user-management-modal .form-group {
    margin-bottom: 16px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.user-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.user-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-item-email {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
}

.user-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

.user-item-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--accent-soft);
    color: var(--accent-ink);
    border: 1px solid rgba(30, 162, 121, 0.2);
}

.user-item-badge.super-admin {
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid var(--accent-primary);
}

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

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    box-shadow: none;
    background-clip: padding-box;
}

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

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

.btn-primary {
    background: var(--gradient-accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(30, 162, 121, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.02);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(30, 162, 121, 0.28);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.btn-danger {
    background: #ffffff;
    color: var(--danger);
    border: 1px solid rgba(196, 98, 95, 0.3);
}

.btn-danger:hover {
    background: rgba(196, 98, 95, 0.08);
}

.btn-large {
    padding: 14px 24px;
    font-size: 15px;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn.is-loading {
    cursor: wait;
    opacity: 0.85;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

/* Dashboard */
.dashboard-actions {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.agent-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.agent-card:hover {
    transform: translateY(-4px);
    border-color: rgba(30, 162, 121, 0.4);
    box-shadow: var(--shadow-md);
}

.agent-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient-accent);
    pointer-events: none;
}

.agent-card-header {
    margin-bottom: 16px;
}

.agent-card-header h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 700;
}

.agent-card-header p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.agent-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.agent-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.agent-card-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 10px 14px;
}

.agent-run-history {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.agent-run-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.agent-run-history-heading strong {
    font-size: 13px;
    color: var(--text-primary);
}

.agent-run-list {
    display: grid;
}

.agent-run-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 0;
    border: 0;
    border-top: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.agent-run-row:first-child {
    border-top: 0;
}

.agent-run-row:hover .agent-run-summary,
.agent-run-row:focus-visible .agent-run-summary {
    color: var(--accent-ink);
}

.agent-run-row:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.agent-run-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.agent-run-status {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.agent-run-summary {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-run-time,
.agent-run-empty {
    color: var(--text-muted);
    font-size: 11px;
}

.agent-run-empty {
    margin: 8px 0 0;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    border-radius: 18px;
    border: 1px dashed var(--border-strong);
    background: var(--bg-tertiary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.35;
}

.empty-state h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 34, 30, 0.2);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    margin: 4% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(244, 251, 247, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.settings-modal .modal-header {
    align-items: center;
    gap: 16px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 700;
}

#agent-modal .modal-header {
    padding: 24px 32px;
}

#agent-modal form {
    padding: 20px 32px 32px;
}

#agent-modal .form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

#agent-modal .form-group:last-of-type {
    margin-bottom: 12px;
}

#agent-modal .form-group {
    margin-bottom: 20px;
}

#agent-modal .field-hint {
    margin-bottom: 10px;
}

#agent-modal .reference-files-upload {
    margin-top: 10px;
}

#agent-modal .folder-selector-wrapper + input[type="text"] {
    margin-top: 10px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.2s;
}

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

/* OneDrive Setup Modal */
.onedrive-setup {
    padding: 24px 28px;
}

.onedrive-setup p {
    color: var(--text-secondary);
    /* margin-bottom: 16px; */
    line-height: 1.6;
}

.onedrive-setup p:last-of-type {
    /* margin-bottom: 24px; */
}

.onedrive-setup .btn {
    width: 100%;
}

/* Forms */
form {
    padding: 24px 28px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.field-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -4px;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background-color: #ffffff;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px transparent;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(30, 162, 121, 0.5);
    box-shadow: 0 0 0 3px rgba(30, 162, 121, 0.12);
    background-color: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Results */
.results-content {
    padding: 24px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

.status-pass {
    background: rgba(30, 162, 121, 0.1);
    color: var(--accent-ink);
    border: 1px solid rgba(30, 162, 121, 0.3);
}

.status-fail {
    background: rgba(196, 98, 95, 0.12);
    color: #7a2e2c;
    border: 1px solid rgba(196, 98, 95, 0.3);
}

.status-error {
    background: rgba(197, 150, 43, 0.12);
    color: #7a5a15;
    border: 1px solid rgba(197, 150, 43, 0.3);
}

.results-summary {
    margin-bottom: 24px;
}

.results-summary h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.report-text {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.6;
}

.loading {
    text-align: center;
    padding: 40px;
}

.loading p {
    color: var(--text-muted);
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        padding: 48px 20px;
    }

    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
    }

    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .side-user {
        width: 100%;
        margin-top: 0;
    }

    .dashboard-main {
        padding: 24px;
    }

    .dashboard-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .auth-pricing {
        padding-bottom: 48px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 12px;
    }

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

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-2 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

/* Custom Alert/Confirm Dialog Styles */
.custom-dialog {
    max-width: 500px;
    margin: 15% auto;
    padding: 0;
}

.custom-dialog .modal-header {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.custom-dialog .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.custom-dialog .modal-body {
    padding: 32px 24px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.custom-dialog .modal-body p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.custom-dialog .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-tertiary);
    border-radius: 0 0 12px 12px;
}

.custom-alert-modal .modal-footer {
    justify-content: center;
}

.custom-alert-modal .btn-primary {
    /* min-width: 120px; */
}

.custom-confirm-modal .modal-footer .btn {
    /* min-width: 100px; */
}

/* Prevent body scroll when custom dialog is open */
body.modal-open {
    overflow: hidden;
}

/* Folder Selector */
.folder-selector-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.folder-selector-wrapper select {
    flex: 1;
}

.btn-small {
    padding: 8px 12px;
    font-size: 14px;
    min-width: auto;
}

.folder-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.small-spinner {
    border: 2px solid var(--border-default);
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

select {
    cursor: pointer;
}

select option {
    padding: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Reference Files Upload UI */
.reference-files-upload {
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    padding: 20px;
    margin-top: 12px;
    background-color: var(--bg-tertiary);
}

.file-type-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.file-type-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.file-type-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.field-hint-small {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.file-type-section input[type="file"] {
    font-size: 14px;
    padding: 8px;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    width: 100%;
    color: var(--text-secondary);
}

.file-type-section input[type="file"]::-webkit-file-upload-button {
    background: var(--accent-primary);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.file-type-section input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--accent-hover);
}

.uploaded-files-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.uploaded-file-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.uploaded-file-item span:first-child {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.uploaded-file-item span:nth-child(2) {
    color: var(--text-muted);
    font-size: 13px;
    margin-right: 12px;
    flex-shrink: 0;
}

.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: var(--text-muted);
}

.btn-delete:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: rgba(30, 162, 121, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(30, 162, 121, 0.2);
    color: var(--text-primary);
}

/* Settings Page Styles */
.modal-large {
    max-width: 960px;
    width: 90%;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.settings-tab {
    background: #ffffff;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 14px;
    text-align: left;
    width: 100%;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.settings-tab:hover {
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}

.settings-tab.active {
    color: var(--text-primary);
    background: #ffffff;
    box-shadow:
        inset 0 0 0 1px rgba(30, 162, 121, 0.35),
        0 12px 18px rgba(30, 162, 121, 0.08);
}

.settings-tab-content {
    padding: 0;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 18px;
}

form {
    padding: 0px;
}

.settings-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 10px 24px 28px;
    align-items: start;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.settings-help {
    font-size: 12px;
    color: var(--text-muted);
    display: grid;
    gap: 8px;
}

.settings-help a {
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
}

.settings-content {
    display: grid;
    gap: 20px;
}

.settings-block {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.settings-block + .settings-block {
    margin-top: 20px;
}

.settings-actions .btn {
    min-width: 140px;
    justify-content: center;
}

.settings-content .user-management-section {
    margin-bottom: 0;
    /* padding-bottom: 0; */
    border-bottom: none;
}

.settings-content .section-header p {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.settings-block-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.settings-block p {
    color: var(--text-secondary);
}

.settings-block .field-hint {
    margin-top: 6px;
}

.settings-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.settings-list li::before {
    content: "•";
    color: var(--accent-primary);
    margin-right: 8px;
}

.settings-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.current-base-path {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.onedrive-status {
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(30, 162, 121, 0.08);
    border-radius: 14px;
    border-left: 4px solid var(--accent-primary);
    color: var(--text-secondary);
}

.onedrive-status.connected {
    border-left-color: var(--success);
}

.onedrive-status.disconnected {
    border-left-color: var(--danger);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Base Path Section */
.onedrive-base-path-section code {
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-ink);
}


/* File Selector Component */
.file-selector {
    margin-bottom: 20px;
}

.file-selector-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.file-selector-step {
    margin-bottom: 16px;
}

.file-selector-step label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.file-selector-dropdown {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.file-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #ffffff;
}

.file-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.file-checkbox-item:hover {
    background: var(--bg-tertiary);
}

.file-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.file-checkbox-item .file-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.file-checkbox-item .file-size {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.no-files-message {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.selected-files-display {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

.selected-files-display strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.selected-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-file-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-primary);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    padding: 0 0 0 6px;
    cursor: pointer;
    margin-left: 4px;
}

.remove-file-btn:hover {
    color: var(--text-primary);
}

/* Marketing Pages */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 13px;
}

.site-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    display: block;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    margin-left: 18px;
    font-weight: 600;
    font-size: 14px;
}

.site-nav a:hover {
    color: var(--text-primary);
}

.pricing-main,
.checkout-main {
    padding: 0;
}

.pricing-main-inner {
    display: grid;
    gap: 56px;
    padding-top: 24px;
    padding-bottom: 72px;
}

.pricing-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.45fr) minmax(320px, 0.55fr);
    gap: 36px;
    align-items: start;
}

.pricing-intro h1 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.pricing-lede {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 480px;
}

.pricing-highlights {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.highlight-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.highlight-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.highlight-card p {
    font-size: 13px;
    color: var(--text-muted);
}

.pricing-note {
    margin-top: 24px;
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.pricing-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: rgba(30, 162, 121, 0.5);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.pricing-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient-accent);
    opacity: 0.8;
}

.plan-tag {
    position: absolute;
    /* top: -14px; */
    right: 18px;
    background: var(--accent-primary);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.plan-name {
    font-size: 18px;
    font-weight: 700;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-ink);
}

.plan-price span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
    display: grid;
    gap: 10px;
}

.plan-features li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-secondary);
    font-size: 13px;
}

.plan-features li::before {
    content: "•";
    color: var(--accent-primary);
    font-weight: 700;
    margin-top: 2px;
}

.plan-features li.disabled {
    opacity: 0.45;
}

.plan-features li.disabled::before {
    content: "-";
    color: var(--text-muted);
}

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

.pricing-footer {
    margin-top: 56px;
    text-align: center;
    color: var(--text-muted);
}

.pricing-footer a {
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
}

.checkout-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.4fr) minmax(320px, 0.6fr);
    gap: 32px;
    align-items: start;
    margin: 24px;
}

.checkout-summary {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.checkout-summary h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.checkout-summary p {
    color: var(--text-secondary);
}

.plan-summary {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
}

.plan-summary h3 {
    margin-top: 0;
    color: var(--accent-ink);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 999px;
    background: var(--gradient-accent);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(30, 162, 121, 0.25);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(30, 162, 121, 0.28);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
}

.success-message,
.error-message {
    display: none;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: left;
}

.success-message {
    background: rgba(30, 162, 121, 0.12);
    color: var(--accent-ink);
    border: 1px solid rgba(30, 162, 121, 0.3);
}

.error-message {
    background: rgba(196, 98, 95, 0.12);
    color: #7a2e2c;
    border: 1px solid rgba(196, 98, 95, 0.3);
}

/* OneDrive Connections List */
.onedrive-connections-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.onedrive-connection-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.onedrive-connection-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.onedrive-connection-card.active {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
}

.connection-info {
    flex: 1;
}

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

.connection-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.connection-active-badge {
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.connection-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.connection-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.connection-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

.connection-actions .btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}

.connection-actions .btn-secondary:hover {
    background: var(--border-subtle);
}

.connection-actions .btn-danger {
    background: rgba(196, 98, 95, 0.12);
    border: 1px solid rgba(196, 98, 95, 0.3);
    color: var(--danger);
}

.connection-actions .btn-danger:hover {
    background: rgba(196, 98, 95, 0.2);
}

/* OneDrive Loading Spinner */
.onedrive-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    gap: 16px;
}

.onedrive-loading p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .pricing-shell,
    .checkout-shell {
        grid-template-columns: 1fr;
    }

    .pricing-main-inner,
    .checkout-main {
        padding-bottom: 60px;
    }

    .settings-shell {
        grid-template-columns: 1fr;
    }
}

/* ========== SECTIONS 2-7 UI STYLES ========== */

.sections-27-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sections-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    border: 1px solid var(--border-subtle);
}

.section-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
}

.section-card h4 {
    margin: 0 0 var(--space-3) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Executive Summary */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: var(--space-2);
    margin-bottom: var(--space-1);
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
}

/* Rule Results Table */
.rule-summary {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-2);
}

.rules-table thead {
    background: var(--bg-tertiary);
}

.rules-table th,
.rules-table td {
    padding: var(--space-2);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.rules-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.rules-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-pass {
    background: rgba(30, 162, 121, 0.15);
    color: var(--success);
}

.badge-fail {
    background: rgba(196, 98, 95, 0.15);
    color: var(--danger);
}

.badge-indeterminate {
    background: rgba(197, 150, 43, 0.15);
    color: var(--warning);
}

.badge-time {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-warning {
    background: rgba(197, 150, 43, 0.15);
    color: var(--warning);
}

.badge-severity-critical,
.badge-severity-error {
    background: rgba(196, 98, 95, 0.15);
    color: var(--danger);
}

.badge-severity-warning {
    background: rgba(197, 150, 43, 0.15);
    color: var(--warning);
}

.badge-severity-info {
    background: rgba(30, 162, 121, 0.15);
    color: var(--success);
}

/* Human Attention Flags */
.human-flags .flags-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.flag-item {
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    border-left: 4px solid;
}

.flag-item.urgency-critical {
    border-left-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.flag-item.urgency-high {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.flag-item.urgency-medium {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.flag-item.urgency-low {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.flag-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.flag-recommendation {
    margin-top: var(--space-1);
    padding: var(--space-2);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Risk Assessment */
.risk-level-badge {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-block;
    margin-bottom: var(--space-2);
}

.risk-level-critical {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.risk-level-high {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.risk-level-medium {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.risk-level-low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.risk-level-unknown {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.risk-critical { color: #dc2626; }
.risk-high { color: #f59e0b; }
.risk-medium { color: #3b82f6; }
.risk-low { color: #10b981; }

/* Workflow Summary */
.workflow-summary {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.workflow-summary span {
    padding: var(--space-1) var(--space-2);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Data Quality */
.data-quality-summary {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

/* Pipeline Summary */
.pipeline-summary summary {
    cursor: pointer;
    padding: var(--space-2);
    user-select: none;
}

.pipeline-summary summary:hover {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.pipeline-details {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}

.pipeline-section {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2);
    border-bottom: 1px solid var(--border-subtle);
}

.pipeline-section:last-child {
    border-bottom: none;
}

.pipeline-section strong {
    color: var(--text-primary);
}

.pipeline-section span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .rule-summary,
    .workflow-summary,
    .data-quality-summary {
        flex-direction: column;
    }

    .rules-table {
        font-size: 0.85rem;
    }

    .rules-table th,
    .rules-table td {
        padding: var(--space-1);
    }

    .pipeline-section {
        flex-direction: column;
        gap: var(--space-1);
    }
}
