:root {
    --bg: #f3efe7;
    --paper: #fffdf9;
    --ink: #1f2937;
    --muted: #5f6b7a;
    --line: #ddd3c5;
    --accent: #b45309;
    --accent-dark: #7c2d12;
    --navy: #10233f;
    --green: #0f766e;
    --shadow: 0 20px 50px rgba(16, 35, 63, 0.12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(180, 83, 9, 0.12), transparent 30%),
        radial-gradient(circle at right, rgba(15, 118, 110, 0.14), transparent 25%),
        var(--bg);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #10233f 0%, #182f52 100%);
    color: #fff; padding: 32px 24px; display: flex; flex-direction: column; gap: 20px;
}
.brand-card h1, .hero h2, .section-head h3, .proposal-section h2, .cover-content h1 { font-family: 'Cormorant Garamond', serif; margin: 0; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; font-weight: 800; color: var(--accent); }
.sidebar .eyebrow, .sidebar .chip, .cover-kicker { color: #ffd6a8; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.summary-card, .panel, .content-card, .mini-card, .price-card, .signature-card, .stat-card, .conclusion-card {
    background: var(--paper); border: 1px solid rgba(221, 211, 197, 0.9); border-radius: 24px; box-shadow: var(--shadow);
}
.summary-card { padding: 18px; color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }
.summary-card strong { display: block; margin: 12px 0 8px; font-size: 20px; }
.chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.main-panel { padding: 32px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 520px); }
.hero, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hero h2 { font-size: 44px; line-height: 1; }
.success-pill { padding: 12px 18px; background: #e6fffa; border-radius: 999px; color: var(--green); font-weight: 700; }
.alert-success { margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; background: #dcfce7; color: #166534; font-weight: 700; }
.alert-error { margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; background: #fee2e2; color: #991b1b; font-weight: 700; }
.panel { padding: 24px; margin-bottom: 24px; }
.compact-panel { padding: 18px 24px; }
.proposal-form, .grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
input, textarea, button, .ghost-btn { font: inherit; }
input, textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; align-items: center; }
button, .ghost-btn, .table-link, .action-bar a, .action-bar button {
    display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700;
}
button, .action-bar button { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; }
.ghost-btn, .table-link, .action-bar a { background: #f8f2e8; color: var(--accent-dark); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 12px; border-bottom: 1px solid #eee5d8; text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.empty { text-align: center; color: var(--muted); }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-actions form { margin: 0; }
.danger-link { background: #fee2e2 !important; color: #991b1b !important; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.status-success { background: #dcfce7; color: #166534; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-neutral { background: #e2e8f0; color: #334155; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; margin: 0; }
.top-gap { margin-top: 18px; }
.message-preview { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #fff8ef; color: #475569; white-space: normal; line-height: 1.5; }
.proposal-body { background: #dfe7ef; padding: 24px; }
.action-bar { display: flex; gap: 12px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.proposal-sheet { max-width: 980px; margin: 0 auto; display: grid; gap: 24px; }
.cover-page {
    position: relative; min-height: 580px; overflow: hidden; border-radius: 28px;
    background: linear-gradient(135deg, rgba(16, 35, 63, 0.92), rgba(124, 45, 18, 0.88)); color: #fff; box-shadow: var(--shadow);
}
.cover-page::before, .cover-page::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.cover-page::before { width: 320px; height: 320px; top: -60px; right: -80px; }
.cover-page::after { width: 220px; height: 220px; bottom: -40px; left: -40px; }
.cover-content { position: relative; z-index: 1; padding: 72px 60px; display: flex; flex-direction: column; justify-content: space-between; min-height: 580px; }
.cover-content h1 { font-size: 68px; line-height: 0.92; max-width: 700px; margin: 18px 0 0; }
.cover-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: auto; }
.cover-meta div { padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.08); }
.cover-meta span, .price-card span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.proposal-section { padding: 28px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); }
.intro-grid, .split, .highlight-grid, .pricing-grid, .contact-grid { display: grid; gap: 20px; }
.intro-grid, .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.highlight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.icon-badge {
    display: inline-flex; width: 52px; height: 52px; border-radius: 18px; align-items: center; justify-content: center;
    font-weight: 800; background: linear-gradient(135deg, #ffe5c2, #ffc07b); color: var(--accent-dark); flex-shrink: 0;
}
.bullet-list { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.bullet-list.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card, .pricing-banner { padding: 24px; background: linear-gradient(135deg, #10233f, #1e3a5f); color: #fff; }
.mini-card { padding: 20px; min-height: 120px; display: flex; align-items: flex-end; font-weight: 700; background: linear-gradient(180deg, #fff8ef, #fff); }
.pricing-banner { border-radius: 24px; margin-bottom: 18px; }
.pricing-banner h2, .price-card strong { font-size: 36px; line-height: 1; margin: 10px 0; }
.price-card { padding: 22px; }
.price-card.focus { background: linear-gradient(135deg, #7c2d12, #b45309); color: #fff; }
.price-card.total { background: linear-gradient(135deg, #e6fffa, #ccfbf1); color: #0f766e; }
hr { border: 0; border-top: 1px solid #eadfce; margin: 18px 0; }
.conclusion-card { text-align: center; background: linear-gradient(180deg, #fff9f2, #fff); }
.signature-page { background: transparent; box-shadow: none; padding: 0; }
.signature-card { padding: 40px 32px; position: relative; overflow: hidden; }
.signature-card::before {
    content: ''; position: absolute; inset: auto -60px -60px auto; width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(180, 83, 9, 0.12), transparent 70%);
}
.signature-block { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 20px; }
.signature-line { width: 220px; border-top: 2px solid #1f2937; margin-bottom: 12px; }
.stamp-effect {
    padding: 18px 24px; border: 3px solid rgba(180, 83, 9, 0.75); color: rgba(180, 83, 9, 0.88); border-radius: 50%;
    font-weight: 800; text-transform: uppercase; transform: rotate(-14deg); min-width: 180px; text-align: center;
}
@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 12px; }
    .grid.three, .grid.four, .pricing-grid, .highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .main-panel, .proposal-body { padding: 16px; }
    .hero h2, .cover-content h1 { font-size: 42px; }
    .grid.two, .grid.three, .grid.four, .intro-grid, .split, .highlight-grid, .pricing-grid, .contact-grid, .cover-meta, .bullet-list.two-col { grid-template-columns: 1fr; }
    .cover-content { padding: 36px 24px; }
    .signature-block { flex-direction: column; align-items: flex-start; }
}
@media print {
    body { background: #fff; padding: 0; }
    .no-print { display: none !important; }
    .proposal-sheet { max-width: none; }
    .proposal-section, .cover-page, .signature-card { box-shadow: none; }
}
