/* ===================================================
   Oformly — Modern Document Service CSS
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #0F766E;
    --color-primary-hover: #115E59;
    --color-primary-light: #E6FFFA;
    --color-success: #059669;
    --color-success-light: #ECFDF5;
    --color-warning: #D97706;
    --color-warning-light: #FFFBEB;
    --color-danger: #DC2626;
    --color-danger-light: #FEF2F2;
    --color-info: #2563EB;
    --color-info-light: #EFF6FF;

    --color-bg: #F6F7F9;
    --color-surface: #FFFFFF;
    --color-border: #E2E8F0;
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 8px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--color-primary-hover); }

img { max-width: 100%; height: auto; }

/* --- Container --- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header --- */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.logo:hover { color: var(--color-primary); }
.logo-icon { font-size: 1.5rem; }
.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

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

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition);
}
.nav-link:hover {
    color: var(--color-text);
    background: var(--color-primary-light);
}
.nav-link--muted { color: var(--color-text-light); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding-bottom: 3rem;
}

/* --- Footer --- */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.footer-links a:hover { color: var(--color-primary); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.btn--primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.btn--success {
    background: var(--color-success);
    color: #fff;
}
.btn--success:hover {
    background: #047857;
    color: #fff;
}

.btn--outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn--sm { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
.btn--lg { font-size: 1rem; padding: 0.8rem 1.75rem; }
.btn--full { width: 100%; }

/* --- Cards --- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card--accent {
    border-color: var(--color-primary);
    border-width: 2px;
}

.card--warning { border-left: 4px solid var(--color-warning); background: var(--color-warning-light); }
.card--info { border-left: 4px solid var(--color-info); background: var(--color-info-light); }
.card--success { border-left: 4px solid var(--color-success); background: var(--color-success-light); }
.card--danger { border-left: 4px solid var(--color-danger); background: var(--color-danger-light); }

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.card-body { padding: 1.25rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1rem; }

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

.form-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-error {
    font-size: 0.8rem;
    color: var(--color-danger);
    margin-top: 0.3rem;
}

.form-help {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.form-required {
    color: var(--color-danger);

}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-row--4 { grid-template-columns: repeat(4, 1fr); }
.form-grid { display: flex; flex-direction: column; }

/* --- Tables --- */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--color-border);
    background: var(--color-bg);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

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

.actions-cell {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge--created { background: #F1F5F9; color: #475569; }
.badge--waiting_payment { background: var(--color-warning-light); color: var(--color-warning); }
.badge--paid { background: var(--color-info-light); color: var(--color-info); }
.badge--processing { background: #FDF4FF; color: #9333EA; }
.badge--completed { background: var(--color-success-light); color: var(--color-success); }
.badge--failed { background: var(--color-danger-light); color: var(--color-danger); }
.badge--refunded { background: #F1F5F9; color: #475569; }
.badge--pending { background: var(--color-warning-light); color: var(--color-warning); }
.badge--rejected { background: var(--color-danger-light); color: var(--color-danger); }

/* --- Alerts --- */
.messages-container { margin-top: 0.75rem; }

.alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.alert--success { background: var(--color-success-light); color: #065F46; }
.alert--error, .alert--danger { background: var(--color-danger-light); color: #991B1B; }
.alert--warning { background: var(--color-warning-light); color: #92400E; }
.alert--info { background: var(--color-info-light); color: #1E40AF; }

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    color: inherit;
}
.alert-close:hover { opacity: 1; }

/* --- Hero --- */
.hero {
    background: #0B1220;
    color: #fff;
    padding: 4.5rem 0 3rem;
    overflow: hidden;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 3rem;
    align-items: center;
}

.hero-content { text-align: left; }

.eyebrow {
    color: #7DD3FC;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: 0;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #CBD5E1;
    max-width: 650px;
    margin: 0 0 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-actions .btn--primary {
    background: #fff;
    color: var(--color-primary);
}
.hero-actions .btn--primary:hover {
    background: #F0EDFF;
    color: var(--color-primary-hover);
}
.hero-actions .btn--outline {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.document-preview {
    background: #162033;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.35);
    overflow: hidden;
}

.preview-toolbar {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 1rem;
    background: #111827;
}
.preview-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94A3B8;
}

.preview-page {
    margin: 1rem;
    padding: 1.5rem;
    min-height: 420px;
    background: #fff;
    color: var(--color-text);
    border-radius: 4px;
}
.preview-line {
    height: 12px;
    width: 68%;
    background: #CBD5E1;
    border-radius: 3px;
    margin-bottom: 0.8rem;
}
.preview-line--wide { width: 92%; height: 16px; background: #334155; }
.preview-block {
    height: 96px;
    background: #E2E8F0;
    border-radius: 6px;
    margin: 1.25rem 0;
}
.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.preview-grid span {
    height: 54px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
}

.service-strip {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.service-strip__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}
.service-strip strong,
.service-strip span {
    display: block;
}
.service-strip strong { font-size: 0.9rem; }
.service-strip span { color: var(--color-text-muted); font-size: 0.85rem; }

.section-header {
    max-width: 680px;
    margin-bottom: 2rem;
}
.section-header .section-title {
    text-align: left;
    margin-bottom: 0.5rem;
}
.section-header p { color: var(--color-text-muted); }

.catalog-section { padding: 4rem 0 1rem; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.pricing-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.35rem;
}
.pricing-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.pricing-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.pricing-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}
.pricing-card__footer strong {
    font-size: 1.25rem;
}
.hero-actions .btn--outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* --- Modern Home --- */
.home-hero {
    background: #F8FAFC;
    border-bottom: 1px solid var(--color-border);
    padding: 5.5rem 0 4rem;
}

.home-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 4rem;
    align-items: center;
}

.home-hero__copy {
    max-width: 720px;
}

.home-hero .eyebrow,
.catalog-modern .eyebrow,
.workflow-section .eyebrow {
    color: var(--color-primary);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.home-hero__title {
    max-width: 760px;
    margin-bottom: 1.25rem;
    font-size: 3.75rem;
    line-height: 1.02;
    font-weight: 800;
    color: #0F172A;
}

.home-hero__text {
    max-width: 620px;
    margin-bottom: 2rem;
    color: var(--color-text-muted);
    font-size: 1.12rem;
}

.home-hero .hero-actions .btn--primary {
    background: var(--color-text);
    color: #fff;
}
.home-hero .hero-actions .btn--primary:hover {
    background: #0F172A;
    color: #fff;
}
.home-hero .hero-actions .btn--outline {
    background: #fff;
    border-color: var(--color-border);
    color: var(--color-text);
}
.home-hero .hero-actions .btn--outline:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary-hover);
}

.hero-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.hero-panel__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.hero-panel__top strong {
    color: var(--color-primary);
}

.hero-panel__body {
    padding: 1.5rem;
}

.doc-row {
    height: 12px;
    width: 74%;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    background: #CBD5E1;
}
.doc-row--dark {
    width: 90%;
    height: 18px;
    background: #0F172A;
}
.doc-row--short {
    width: 48%;
}

.doc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.doc-fields span {
    height: 72px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #F8FAFC;
}

.doc-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
    font-size: 0.9rem;
}

.home-metrics {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.home-metrics__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.home-metrics strong,
.home-metrics span {
    display: block;
}
.home-metrics strong {
    color: var(--color-text);
    font-size: 0.95rem;
}
.home-metrics span {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.catalog-modern {
    padding: 4.5rem 0;
}

.catalog-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 1.5rem;
}
.catalog-heading h2,
.workflow-grid h2 {
    font-size: 2rem;
    line-height: 1.15;
}
.catalog-heading > p {
    color: var(--color-text-muted);
}

.catalog-list {
    display: grid;
    gap: 0.9rem;
}

.doc-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}
.doc-card:hover {
    border-color: #B6C2D1;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.doc-card__badge {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}
.doc-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.22rem;
}
.doc-card p {
    max-width: 720px;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}
.doc-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.doc-card__meta span {
    padding: 0.32rem 0.55rem;
    border-radius: 7px;
    background: #F1F5F9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 500;
}
.doc-card__side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--color-border);
}
.doc-card__label {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.doc-card__side strong {
    font-size: 1.55rem;
    line-height: 1;
}

.workflow-section {
    padding: 4rem 0 5rem;
    background: #fff;
    border-top: 1px solid var(--color-border);
}
.workflow-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
    gap: 3rem;
}
.workflow-list {
    display: grid;
    gap: 0.75rem;
}
.workflow-list div {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}
.workflow-list strong {
    color: var(--color-primary);
}
.workflow-list span {
    color: var(--color-text-muted);
}

/* --- App Pages --- */
.app-page {
    background: #F8FAFC;
    min-height: calc(100vh - 64px);
    padding-bottom: 4rem;
}

.app-page .page-content,
.app-page.dashboard {
    padding-top: 2.25rem;
}

.app-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.app-page-header .eyebrow {
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.app-page-header .page-title {
    margin-bottom: 0.35rem;
    color: #0F172A;
    font-size: 1.85rem;
    line-height: 1.15;
}

.page-subtitle {
    max-width: 720px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.app-page .card {
    border-radius: 8px;
    box-shadow: none;
}

.app-page .card-header {
    background: #fff;
}

.table-card {
    overflow: hidden;
}

.table-card .table-responsive {
    background: #fff;
}

.table-card .table th {
    background: #F8FAFC;
}

.table-card .table tr:last-child td {
    border-bottom: 0;
}

.auth-page.app-page {
    min-height: calc(100vh - 64px);
    padding: 4rem 1rem;
}

.auth-card {
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.auth-card .eyebrow {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 0.45rem;
}

.auth-title {
    color: #0F172A;
}

.dashboard-grid .card--accent {
    border-color: var(--color-border);
}

.balance-display {
    align-items: flex-start;
}

.balance-amount {
    color: #0F172A;
}

.product-item,
.document-item {
    gap: 1rem;
}

.price-pill {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #0F172A;
    color: #fff;
    font-weight: 700;
}

.order-form {
    max-width: 920px;
}

.order-form .card {
    border-color: #DDE5EE;
}

.legal-page {
    max-width: 920px;
}

.legal-card {
    padding: 0;
}

.legal-card .legal-text {
    padding: 1.5rem;
}

.legal-text h2:first-of-type {
    margin-top: 0;
}

.empty-state {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

/* --- How It Works --- */
.how-it-works {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-text);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Features --- */
.features {
    padding: 3rem 0 5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Auth Pages --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 1.25rem;
}

/* --- Dashboard --- */
.dashboard { padding-top: 2rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.balance-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.25rem;
}

.balance-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.product-item, .document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
}
.product-item:last-child, .document-item:last-child { border-bottom: none; }

/* --- Page Content --- */
.page-content { padding-top: 2rem; }

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* --- Detail Grid --- */
.detail-grid { display: flex; flex-direction: column; gap: 0.85rem; }

.detail-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.detail-label {
    flex-shrink: 0;
    width: 180px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.detail-value { font-size: 0.95rem; }

/* --- Two Column Layout --- */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* --- Balance Info --- */
.balance-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* --- Payment Instructions --- */
.payment-instructions {
    background: var(--color-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.payment-target {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
}
.payment-target span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.payment-target strong {
    font-size: 1.1rem;
}

.payment-qr {
    display: block;
    width: min(240px, 100%);
    height: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.support-info { font-size: 0.9rem; color: var(--color-text-muted); }

/* --- Order Summary --- */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}
.empty-state p { margin-bottom: 1rem; }

/* --- Legal Text --- */
.legal-text h2 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
}
.legal-text p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* --- Utility --- */
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-danger { color: var(--color-danger); }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.25rem; }
.mt-4 { margin-top: 1.75rem; }
.mb-3 { margin-bottom: 1.25rem; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .home-hero__grid,
    .catalog-heading,
    .workflow-grid {
        grid-template-columns: 1fr;
    }
    .home-hero__title { font-size: 3rem; }
    .home-metrics__grid { grid-template-columns: 1fr; }
    .doc-card { grid-template-columns: 1fr; }
    .doc-card__side {
        padding-left: 0;
        padding-top: 1rem;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    .app-page-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .hero-layout { grid-template-columns: 1fr; }
    .document-preview { max-width: 480px; }
    .service-strip__inner { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .two-col-layout { grid-template-columns: 1fr; }
    .form-row--4 { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 640px) {
    .mobile-menu-btn { display: flex; }

    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    .nav--open { display: flex; }

    .nav-link { padding: 0.75rem; width: 100%; }
    .btn--sm.nav + .nav { margin-top: 0; }

    .hero { padding: 3rem 0; }
    .home-hero { padding: 3.5rem 0 2.75rem; }
    .home-hero__title { font-size: 2.25rem; }
    .home-hero__text { font-size: 1rem; }
    .catalog-modern { padding: 3rem 0; }
    .catalog-heading h2,
    .workflow-grid h2 { font-size: 1.55rem; }
    .doc-card { padding: 1rem; }
    .doc-fields { grid-template-columns: 1fr; }
    .workflow-list div { grid-template-columns: 42px 1fr; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .preview-page { min-height: 320px; padding: 1rem; }

    .features-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row--4 { grid-template-columns: 1fr; }

    .detail-row { flex-direction: column; gap: 0.2rem; }
    .detail-label { width: auto; }

    .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
    .footer-links { flex-direction: column; gap: 0.5rem; align-items: center; }

    .page-header { flex-direction: column; align-items: flex-start; }

    .auth-card { padding: 1.75rem 1.25rem; }
}
