﻿@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
    --ink: #101820;
    --ink-soft: #384550;
    --paper: #f6f1e8;
    --paper-alt: #ffffff;
    --accent: #f25f4c;
    --accent-dark: #d84a39;
    --accent-2: #3a7d7c;
    --accent-3: #f2b134;
    --line: #d9d2c4;
    --shadow: 0 20px 50px rgba(16, 24, 32, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top, #fdf8f0 0%, #f4efe4 40%, #efe7d7 100%);
}

body.public {
    background: linear-gradient(120deg, rgba(16, 24, 32, 0.8), rgba(16, 24, 32, 0.2)),
        url('/images/bg.png') center/cover no-repeat fixed;
    color: #f6f1e8;
}

body.public .site-header {
    background: rgba(16, 24, 32, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.public .brand-tag,
body.public .lead,
body.public .hero-meta span,
body.public .contact-note,
body.public .muted {
    color: rgba(246, 241, 232, 0.8);
}

body.public .hero-card,
body.public .card,
body.public .contact-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f6f1e8;
    box-shadow: none;
}

body.public .hero-card li,
body.public .card {
    background: rgba(255, 255, 255, 0.08);
}

body.public .section.dark {
    background: rgba(16, 24, 32, 0.85);
}

body.public .site-footer {
    background: rgba(16, 24, 32, 0.85);
    border-top-color: rgba(255, 255, 255, 0.1);
    color: rgba(246, 241, 232, 0.85);
}

body.public .button.ghost {
    border-color: rgba(255, 255, 255, 0.4);
}

body.public .button {
    color: #f6f1e8;
    border-color: rgba(246, 241, 232, 0.6);
}

body.public .button.primary {
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.dashboard .container {
    width: min(1200px, 94vw);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 241, 232, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

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

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

.logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
    font-size: 20px;
    font-family: 'DM Serif Display', serif;
}

.logo-image {
    width: 78px;
    height: 78px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
}

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

.brand-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
}

.menu {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.menu a {
    font-weight: 500;
}

.hero {
    padding: 90px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-2);
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(32px, 5vw, 54px);
    margin: 12px 0 16px;
}

.lead {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.hero-meta strong {
    display: block;
    font-size: 18px;
}

.hero-meta span {
    font-size: 13px;
    color: var(--ink-soft);
}

.hero-card {
    background: var(--paper-alt);
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.hero-card h2 {
    margin-top: 0;
    font-size: 24px;
}

.hero-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    gap: 10px;
}

.hero-card li {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8f3ea;
}

.hero-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.section {
    padding: 70px 0;
}

.section.dark {
    background: var(--ink);
    color: var(--paper);
}

.section-head {
    margin-bottom: 32px;
}

.section-head h2 {
    margin: 0 0 10px;
    font-size: 32px;
}

.grid {
    display: grid;
    gap: 20px;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--paper-alt);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.section.dark .card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.steps {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--accent-3);
    margin-bottom: 10px;
}

.contact {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: center;
}

.contact-card {
    background: var(--paper-alt);
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.contact-note {
    font-size: 13px;
    color: var(--ink-soft);
}

.site-footer {
    padding: 30px 0 40px;
    border-top: 1px solid var(--line);
    background: #efe7d7;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    background: transparent;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.button.danger {
    background: #c9362a;
    color: #fff;
    border-color: #c9362a;
}

.button.ghost {
    border-color: var(--line);
}

.button.full {
    width: 100%;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.dashboard {
    padding: 50px 0 80px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 36px;
    align-items: start;
}

.dashboard-grid + .panel {
    margin-top: 36px;
}

.panel {
    background: var(--paper-alt);
    padding: 32px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    min-width: 0;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form input,
.form select,
.form textarea {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #fffdf9;
}

.project-list {
    display: grid;
    gap: 16px;
}

.project-card {
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 18px;
    background: #fffdf9;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.button.danger.ghost {
    background: transparent;
    color: #c9362a;
    border-color: #c9362a;
}

.project-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e0efe7;
    color: #1f5f3a;
}

.status.new {
    background: #e8e4ff;
    color: #3b2b8a;
}

.status.in-progress {
    background: #fff2d0;
    color: #a25a00;
}

.status.on-hold {
    background: #f7d6d8;
    color: #8f2a2c;
}

.status.completed {
    background: #d5e5ff;
    color: #2255aa;
}

.progress {
    margin: 12px 0;
    height: 8px;
    background: #efe7d7;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-2);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.notes {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.note {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fffdf9;
}

.note-meta {
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.alert {
    background: #f7d6d8;
    color: #7a2224;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid #e8b4b9;
}

.alert.success {
    background: #e0f3e6;
    color: #1f5f3a;
    border-color: #b8e1c6;
}

.invoice-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 18px;
    background: #fffdf9;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 28px;
}

.invoice-summary strong {
    display: block;
    font-size: 18px;
    margin-top: 6px;
}

.invoice-table {
    display: grid;
    gap: 8px;
    margin: 16px 0 22px;
}

.invoice-row {
    display: grid;
    grid-template-columns: minmax(140px, 2fr) minmax(40px, 0.6fr) minmax(70px, 0.8fr) minmax(80px, 0.8fr);
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fffdf9;
    font-size: 14px;
    min-width: 0;
}

.invoice-row.header {
    font-weight: 600;
    background: #f5efe5;
}

.invoice-form {
    margin-top: 12px;
}

.invoice-payments {
    margin-top: 22px;
}

.payments-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
}

.payment {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fffdf9;
    font-size: 14px;
}

.muted {
    color: var(--ink-soft);
}

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #fef8ee 0%, #f3e9d6 60%, #eddcc2 100%);
}

.auth-card {
    width: min(420px, 90vw);
    background: var(--paper-alt);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.auth-footer {
    margin-top: 16px;
    font-size: 14px;
}

.confirm {
    max-width: 720px;
    margin: 0 auto;
}

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

.invoice-view {
    background: radial-gradient(circle at top, #fdf8f0 0%, #f4efe4 50%, #efe7d7 100%);
}

.invoice-page {
    padding: 60px 0 80px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.invoice-meta {
    text-align: right;
}

@media (max-width: 720px) {
    .menu {
        justify-content: flex-start;
    }
    .project-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .invoice-meta {
        text-align: left;
    }
    .invoice-row {
        grid-template-columns: 1fr 1fr;
    }
    .invoice-row span:first-child {
        grid-column: 1 / -1;
    }
}
