/* ==========================================================================
   MarginVault Visual Design System & Shared Stylesheet
   Based on the approved dark slate + emerald aesthetic.
   Local-first, zero-CDN, strictly self-contained.
   ========================================================================== */

:root {
    /* Color Palette: Dark Slate & Modern Accents */
    --bg-body: #0f172a;        /* slate-900 */
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-card: #1e293b;        /* slate-800 */
    --bg-card-hover: #334155;  /* slate-700 */
    --bg-elevated: #334155;    /* slate-700 */
    --bg-input: #0f172a;       /* slate-900 */
    --bg-input-focus: #1e293b; /* slate-800 */

    /* Typography & Foreground */
    --text-primary: #f8fafc;   /* slate-50 */
    --text-secondary: #94a3b8; /* slate-400 */
    --text-muted: #64748b;     /* slate-500 */
    --text-inverse: #0f172a;

    /* Borders & Dividers */
    --border-color: #334155;   /* slate-700 */
    --border-subtle: #1e293b;  /* slate-800 */
    --border-hover: #475569;   /* slate-600 */

    /* Emerald Brand Accents */
    --accent-emerald: #10b981;       /* emerald-500 */
    --accent-emerald-hover: #059669; /* emerald-600 */
    --accent-emerald-light: #34d399; /* emerald-400 */
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-emerald-bg: rgba(16, 185, 129, 0.12);

    /* Feedback & Status Colors */
    --accent-red: #ef4444;           /* red-500 */
    --accent-red-hover: #dc2626;     /* red-600 */
    --accent-red-bg: rgba(239, 68, 68, 0.15);
    --accent-amber: #f59e0b;         /* amber-500 */
    --accent-amber-bg: rgba(245, 158, 11, 0.15);
    --accent-blue: #38bdf8;          /* sky-400 */
    --accent-blue-bg: rgba(56, 189, 248, 0.15);

    /* Typography Hierarchy */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Geometry, Radii & Shadows */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px -3px rgba(16, 185, 129, 0.3);

    /* Layout Constraints */
    --container-max-width: 1152px; /* max-w-6xl */
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

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

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Language Toggle Rules */
body.lang-de .show-en { display: none !important; }
body.lang-en .show-de { display: none !important; }

a {
    color: var(--accent-emerald-light);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-emerald);
}

/* Helpers */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-emerald { color: var(--accent-emerald); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-mono { font-family: var(--font-mono); }
.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-extrabold { font-weight: 800; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-md { font-size: 0.95rem; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.35rem; }
.text-2xl { font-size: 2.25rem; }
.text-blue { color: var(--accent-blue); }
.text-red { color: var(--accent-red); }
.text-amber { color: var(--accent-amber); }
.text-emerald-light { color: var(--accent-emerald-light); }
.w-full { width: 100%; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.gap-xs { gap: 0.4rem; }
.gap-sm { gap: 0.6rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.cursor-pointer { cursor: pointer; }
.btn-disabled { opacity: 0.6; cursor: not-allowed; }
.icon-xs { width: 0.85rem; height: 0.85rem; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.max-w-800 { max-width: 800px; }
.m-auto { margin: 0 auto; }
.p-sm { padding: 0.75rem; }
.p-md { padding: 1.25rem; }
.p-lg { padding: 2rem; }
.border-amber-subtle { border: 1px solid rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.04); }
.border-emerald-subtle { border: 1px solid var(--accent-emerald-glow); background: var(--accent-emerald-bg); }
.border-subtle-box { border: 1px solid var(--border-color); background: rgba(15, 23, 42, 0.6); border-radius: var(--radius-md); }
.card-sidebar-info { padding: 1.25rem; font-size: 0.8rem; color: var(--text-muted); }
.card-sidebar-info-title { font-weight: 700; color: var(--text-secondary); margin-bottom: 0.4rem; }
.item-note-row { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border-subtle); font-size: 0.85rem; color: var(--text-secondary); }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

.header-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-icon-svg {
    width: 1.85rem;
    height: 1.85rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

.brand-vault {
    color: var(--accent-emerald);
}

.version-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(51, 65, 85, 0.5);
}

.nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

button.nav-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.lang-btn svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--accent-emerald);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald-light);
    background-color: var(--accent-emerald-bg);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--accent-emerald-glow);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-emerald);
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px var(--accent-emerald);
}

/* ==========================================================================
   Main Layout & Content Area
   ========================================================================== */

.main-content {
    flex: 1;
    max-width: var(--container-max-width);
    width: 100%;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
}

/* Page Titles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Cards & Containers
   ========================================================================== */

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-emerald);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--accent-emerald);
    color: #ffffff;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-emerald-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-danger {
    background-color: var(--accent-red-bg);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-label .required {
    color: var(--accent-red);
    margin-left: 0.2rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 2px var(--accent-emerald-glow);
    background-color: var(--bg-input-focus);
}

/* ==========================================================================
   Workspace 2-Column Dashboard Layout ("Magic Screen")
   ========================================================================== */

.workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 960px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }
}

.prepare-card {
    padding: 2rem 2.25rem;
}

.card-header-styled {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.prepare-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prepare-icon-box {
    width: 3rem;
    height: 3rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prepare-icon-box svg {
    width: 1.6rem;
    height: 1.6rem;
}

.prepare-heading {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
}

.prepare-subheading {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ==========================================================================
   Dropzone / Upload Area
   ========================================================================== */

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.5rem;
    text-align: center;
    background-color: rgba(15, 23, 42, 0.5);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-emerald);
    background-color: rgba(16, 185, 129, 0.05);
}

.upload-icon-container {
    width: 3.25rem;
    height: 3.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    transition: all 0.15s ease;
}

.upload-zone:hover .upload-icon-container {
    border-color: var(--accent-emerald-glow);
    background-color: var(--accent-emerald-bg);
}

.upload-icon-svg {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.upload-zone:hover .upload-icon-svg {
    color: var(--accent-emerald-light);
}

.upload-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.upload-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-feedback-chip {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 480px;
    padding: 0.65rem 1rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    border-radius: var(--radius-md);
    text-align: left;
}

.feedback-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.feedback-icon {
    color: var(--accent-emerald);
    font-weight: 700;
}

.feedback-name {
    color: var(--accent-emerald-light);
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.feedback-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Pricing Controls inside Magic Screen
   ========================================================================== */

.pricing-control-card {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.pricing-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.pricing-scope-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-emerald-light);
    background-color: var(--accent-emerald-bg);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--accent-emerald-glow);
}

.pricing-mode-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.75rem;
    align-items: center;
}

@media (max-width: 600px) {
    .pricing-mode-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-suffix {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.pricing-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.85rem;
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.pricing-note svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ==========================================================================
   Optional Details Collapsible
   ========================================================================== */

.optional-details-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 1rem;
}

.optional-summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.optional-content {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Sidebar Cards & Feature Lists
   ========================================================================== */

.sidebar-card {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.85rem;
}

.feature-icon {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.spec-rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.825rem;
}

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

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

.spec-val {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
}

.pipeline-mini-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.825rem;
}

.pipeline-mini-steps li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-secondary);
}

.mini-step-num {
    width: 1.35rem;
    height: 1.35rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    color: var(--accent-emerald-light);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Result Presentation & Complete Pages (Preview & Complete)
   ========================================================================== */

.result-container {
    max-width: 980px;
    margin: 0 auto;
}

.result-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-emerald-light);
    background-color: var(--accent-emerald-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--accent-emerald-glow);
    letter-spacing: 0.04em;
}

.result-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    gap: 1rem;
    flex-wrap: wrap;
}

.complete-container {
    max-width: 760px;
    margin: 1.5rem auto 3rem;
}

.complete-card {
    padding: 2.5rem 2rem;
}

.complete-card-success {
    border: 2px solid var(--accent-emerald);
    box-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.25);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.complete-card-blocked {
    border: 2px solid var(--accent-red);
    box-shadow: 0 0 35px -5px rgba(239, 68, 68, 0.25);
}

.complete-icon-box {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.complete-icon-success {
    background-color: var(--accent-emerald-bg);
    border: 2px solid var(--accent-emerald-glow);
    color: var(--accent-emerald);
}

.complete-icon-blocked {
    background-color: var(--accent-red-bg);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: var(--accent-red);
}

.complete-icon-box svg {
    width: 2.25rem;
    height: 2.25rem;
}

.complete-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.complete-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.75rem;
    line-height: 1.55;
}

.complete-audit-box {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.download-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.download-sub-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

@media (max-width: 600px) {
    .download-sub-actions {
        grid-template-columns: 1fr;
    }
}

.retention-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 1rem;
}

.retention-notice svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

.complete-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Alerts & Banners
   ========================================================================== */

.alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.alert-error {
    background-color: var(--accent-red-bg);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-error strong {
    color: #fecaca;
}

.alert-private {
    background-color: var(--accent-amber-bg);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fde68a;
}

.alert-dismiss {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* ==========================================================================
   Pills & Badges
   ========================================================================== */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pill-success {
    background-color: var(--accent-emerald-bg);
    color: var(--accent-emerald-light);
    border: 1px solid var(--accent-emerald-glow);
}

.pill-muted {
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pill-amber {
    background-color: var(--accent-amber-bg);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pill-blue {
    background-color: var(--accent-blue-bg);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.data-table th {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Grids, Stats & Detail Views
   ========================================================================== */

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

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

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

/* ==========================================================================
   Hero Section (Landing / Welcome)
   ========================================================================== */

.hero-section {
    padding: 3.5rem 1rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    color: var(--accent-emerald-light);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.gradient-text {
    color: var(--accent-emerald);
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 2.25rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.trust-badge-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-emerald);
}

/* ==========================================================================
   How It Works & Steps
   ========================================================================== */

.how-it-works-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.steps-grid {
    margin-top: 2.5rem;
}

.step-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    color: var(--accent-emerald-light);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    padding: 3.5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.faq-list {
    max-width: 800px;
    margin: 2.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.15s ease;
}

.faq-item[open] {
    border-color: var(--border-hover);
    background-color: #243044;
}

.faq-question {
    padding: 1.15rem 1.35rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
}

.faq-caret {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-caret {
    transform: rotate(180deg);
    color: var(--accent-emerald);
}

.faq-answer {
    padding: 0 1.35rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.85rem;
}

/* ==========================================================================
   Pricing Cards & Grid
   ========================================================================== */

.pricing-container {
    padding: 1.5rem 0;
}

.pricing-grid {
    align-items: stretch;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
}

.featured-pricing-card {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.25);
    background: linear-gradient(180deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-emerald);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-full);
}

.pricing-card-header {
    margin-bottom: 1.5rem;
}

.tier-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.tier-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.tier-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.price-original {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-period {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tier-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex: 1;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-check {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

/* ==========================================================================
   Private Access & Login / Register Cards
   ========================================================================== */

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

.access-card {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.access-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.access-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.access-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.access-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.access-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 0.35rem;
}

.access-info-box {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.access-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.access-footer-links {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.access-footer-links a {
    color: var(--text-muted);
}

.access-footer-links a:hover {
    color: var(--accent-emerald-light);
}

/* ==========================================================================
   Legal Center Layout & Sidebar
   ========================================================================== */

.legal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 860px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
}

.legal-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legal-tab-btn {
    width: 100%;
    text-align: left;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.15s ease;
}

.legal-tab-btn svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.legal-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
    border-color: var(--border-hover);
}

.legal-tab-btn.active {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
    border-color: var(--accent-emerald);
    box-shadow: 0 0 10px -2px var(--accent-emerald-glow);
}

.legal-tab-btn.active svg {
    color: var(--accent-emerald);
}

.legal-content-panel {
    min-height: 400px;
}

.legal-section {
    display: none;
}

.legal-section.active {
    display: block;
}

.legal-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-emerald-light);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-body h3:first-child {
    margin-top: 0;
}

.legal-body p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.legal-body strong {
    color: var(--text-primary);
}

/* ==========================================================================
   Code & Details Tags
   ========================================================================== */

code {
    font-family: var(--font-mono);
    background-color: var(--bg-elevated);
    color: var(--accent-emerald-light);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
}

/* Details Caret Styling */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

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

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
    border-top: 1px solid var(--border-color);
    background-color: #020617; /* slate-950 */
    padding: 1.75rem 1.5rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: auto;
    width: 100%;
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--accent-emerald);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--accent-emerald-light);
}
