:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #eef2f6;
    --text: #202636;
    --muted: #687386;
    --line: #dfe5ec;
    --dark: #111827;
    --primary: #ed1c2a;
    --primary-dark: #c91420;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
    --shadow: 0 18px 45px rgba(16, 24, 40, .08);
    --radius: 8px;
    --container: 1180px;
}

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

body {
    min-height: 100vh;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

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

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    color: var(--dark);
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: 0;
}

.logo span {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a {
    color: #3f4858;
    font-size: .92rem;
    font-weight: 800;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    place-items: center;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--dark);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 104px 0 132px;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #f1f4f8 100%);
    border-bottom: 1px solid var(--line);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    left: -10%;
    bottom: -78px;
    width: 120%;
    height: 160px;
    border-radius: 50%;
    background: rgba(213, 219, 227, .78);
    transform: rotate(-4deg);
}

.hero::after {
    bottom: -108px;
    background: rgba(235, 238, 243, .95);
    transform: rotate(3deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.eyebrow {
    color: var(--primary);
    font-size: .84rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.hero h1 {
    color: var(--dark);
    font-size: clamp(2.7rem, 5vw, 4.65rem);
    line-height: 1.02;
    margin-bottom: 20px;
}

.hero p {
    max-width: 710px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions,
.actions,
.inline-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions,
.actions {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 144px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--dark);
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
}

.btn.small {
    min-width: 0;
    min-height: 36px;
    padding: 0 12px;
    font-size: .84rem;
}

.btn:hover {
    border-color: #cbd5e1;
}

.btn.primary,
.btn:not(.btn-secondary):not(.danger) {
    background: linear-gradient(180deg, #ff2936, var(--primary));
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 14px 28px rgba(237, 28, 42, .24);
}

.btn.primary:hover,
.btn:not(.btn-secondary):not(.danger):hover {
    background: linear-gradient(180deg, #f31e2c, var(--primary-dark));
}

.btn-secondary {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

.btn.danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.section {
    padding: 82px 0;
}

.section-light {
    background: transparent;
}

.section-soft,
.muted {
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.page-title {
    padding: 62px 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.page-title h1,
.dashboard h1,
.auth-page h1 {
    color: var(--dark);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    margin-bottom: 10px;
}

.page-title p,
.lead,
.section-text,
.text-block,
.contact-box,
.panel p,
.muted-note {
    color: var(--muted);
}

.muted-note {
    font-weight: 700;
    margin: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.section-heading span {
    width: 140px;
    max-width: 18vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cdd5df, transparent);
}

.section-heading h2,
.future-box h2 {
    color: var(--dark);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.1;
}

.section-text {
    max-width: 840px;
    margin: 0 auto 38px;
    text-align: center;
    font-size: 1.04rem;
}

.grid,
.feature-grid,
.future-items {
    display: grid;
    gap: 20px;
}

.cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3,
.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4,
.feature-grid,
.future-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.panel,
.feature-card,
.future-item,
.contact-highlight,
.text-block,
.contact-box,
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card,
.panel,
.feature-card,
.future-item,
.text-block,
.contact-box,
.stat {
    padding: 24px;
}

.feature-card,
.future-item,
.stat {
    text-align: center;
}

.feature-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #fff;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3,
.future-item strong,
.card h3 {
    color: var(--dark);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.feature-card p,
.card p {
    color: var(--muted);
}

.future-box {
    text-align: center;
    max-width: 1040px;
    margin: 0 auto;
}

.future-box p {
    max-width: 760px;
    margin: 14px auto 34px;
    color: var(--muted);
}

.future-item span {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #fff;
    font-weight: 800;
}

.contact-highlight {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.contact-highlight h2 {
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 8px;
}

.contact-highlight p {
    max-width: 720px;
    color: var(--muted);
    margin-bottom: 12px;
}

.contact-list {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card > img,
.project-card .project-card-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    background: #111827;
    margin-bottom: 16px;
}

.prices {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--dark);
    font-weight: 800;
}

.project-card p {
    display: -webkit-box;
    min-height: 4.6em;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.project-action {
    margin-top: 14px;
    align-self: flex-start;
}

.image-update-form {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.project-admin-actions {
    margin-top: 14px;
}

.admin-preview-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    background: #111827;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
    filter: grayscale(1);
}

.project-detail {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}

.project-detail-image,
.project-detail-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.project-detail-image {
    overflow: hidden;
}

.project-detail-image img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    background: #111827;
}

.project-detail-content {
    padding: 28px;
}

.project-detail-content h2 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.project-description {
    display: grid;
    gap: 14px;
    color: var(--muted);
}

.detail-prices {
    margin-top: 24px;
}

.detail-actions {
    justify-content: flex-start;
    margin-top: 20px;
}

.auth-page {
    min-height: calc(100vh - 149px);
    display: grid;
    place-items: center;
    padding: 48px 16px;
}

.auth-page .panel {
    width: min(460px, 100%);
}

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

.form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    margin-bottom: 24px;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    color: var(--dark);
    font-size: .9rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(237, 28, 42, .55);
    box-shadow: 0 0 0 4px rgba(237, 28, 42, .08);
}

.alert {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #dcfce7;
    color: #166534;
    font-weight: 800;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.dashboard {
    padding: 42px 0 76px;
}

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

.tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tabs a {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--dark);
    font-weight: 800;
}

.stat strong {
    display: block;
    color: var(--primary);
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 8px;
}

.stat span {
    color: var(--muted);
    font-weight: 800;
}

.finance-panel {
    margin-top: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.panel-heading .eyebrow {
    margin-bottom: 6px;
}

.panel-heading h2 {
    color: var(--dark);
    font-size: 1.7rem;
    line-height: 1.15;
}

.panel-heading > strong {
    min-width: 170px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #111827;
    color: #fff;
    text-align: center;
    font-size: 1.25rem;
}

.finance-stats {
    margin-bottom: 22px;
}

.finance-stats article {
    min-height: 104px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.finance-stats span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.finance-stats strong {
    color: var(--dark);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.1;
}

.finance-chart {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.chart-group {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.chart-group h3 {
    color: var(--dark);
    font-size: 1rem;
}

.chart-row {
    display: grid;
    grid-template-columns: 132px minmax(120px, 1fr) minmax(92px, auto);
    align-items: center;
    gap: 12px;
}

.chart-row span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.chart-row strong {
    color: var(--dark);
    font-size: .95rem;
    text-align: right;
    white-space: nowrap;
}

.chart-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf0;
}

.chart-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #111827);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.table-link {
    color: var(--primary);
    font-weight: 800;
}

.table-link:hover {
    color: var(--primary-dark);
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.subscription {
    display: grid;
    gap: 18px;
}

.sub-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sub-top img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
    background: #111827;
}

.subscription dl {
    display: grid;
    gap: 10px;
}

.subscription dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

dt {
    color: var(--muted);
    font-weight: 800;
}

dd {
    margin: 0;
    color: var(--dark);
    font-weight: 800;
}

.badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
}

.badge.active,
.badge.paid {
    background: #dcfce7;
    color: var(--success);
}

.badge.pending,
.badge.cancel_requested,
.badge.draft {
    background: #fef3c7;
    color: var(--warning);
}

.badge.cancelled,
.badge.overdue {
    background: #fee2e2;
    color: var(--danger);
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
}

.footer-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: .94rem;
}

.footer-inner a {
    font-weight: 800;
}

@media (max-width: 980px) {
    .cards-2,
    .cards-3,
    .cards-4,
    .finance-chart,
    .feature-grid,
    .future-items,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .contact-highlight,
    .admin-detail-grid,
    .project-detail,
    .dash-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .contact-list {
        justify-items: center;
    }

    .actions,
    .inline-form {
        justify-content: center;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: grid;
    }

    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .nav.open {
        display: flex;
    }

    .footer-inner {
        min-height: auto;
        padding: 24px 0;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 78px 0 104px;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .section {
        padding: 62px 0;
    }

    .section-heading {
        gap: 12px;
    }

    .section-heading span {
        width: 58px;
    }

    .btn {
        width: 100%;
        min-width: 0;
    }

    .sub-top,
    .subscription dl div {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-heading {
        flex-direction: column;
    }

    .panel-heading > strong {
        width: 100%;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chart-row strong {
        text-align: left;
    }
}
