:root {
    --green-900: #063c2d;
    --green-800: #07543c;
    --green-700: #08764f;
    --green-600: #10a46b;
    --green-500: #17c783;
    --green-100: #e7fff4;
    --white: #ffffff;
    --dark: #11231c;
    --muted: #64746e;
    --border: rgba(7, 84, 60, 0.14);
    --shadow: 0 24px 70px rgba(6, 60, 45, 0.15);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--dark);
    background: #f7fff9;
    min-height: 100vh;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 199, 131, 0.22), rgba(23, 199, 131, 0));
    z-index: -2;
    animation: pulseGlow 7s ease-in-out infinite;
}

body::before {
    top: 90px;
    left: -120px;
}

body::after {
    right: -130px;
    bottom: 70px;
    animation-delay: 1.5s;
}

.page-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(6, 60, 45, 0.05), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 80% 20%, rgba(16, 164, 107, 0.14), transparent 30%);
    z-index: -3;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: linear-gradient(135deg, rgba(6, 60, 45, 0.98), rgba(16, 164, 107, 0.98));
    color: var(--white);
    box-shadow: 0 18px 40px rgba(6, 60, 45, 0.28);
}

.header-main {
    min-height: 72px;
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.header-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: translateX(-100%);
    animation: shineHeader 5s ease-in-out infinite;
    pointer-events: none;
}

.brand-left {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.brand-left img,
.auth-logo {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.header-title {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
}

.header-action {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-tabs {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 18px 10px;
}

.nav-tabs > a,
.nav-dropdown > a {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 12px 15px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    transition: 0.25s ease;
}

.nav-tabs > a:hover,
.nav-tabs > a.active,
.nav-dropdown > a:hover,
.nav-dropdown > a.active {
    color: var(--green-900);
    background: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 42px;
    left: 0;
    min-width: 160px;
    background: var(--white);
    color: var(--dark);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.25s ease;
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.dropdown-menu a:hover {
    background: var(--green-100);
    color: var(--green-800);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hamburger {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    margin: 5px auto;
    border-radius: 10px;
    transition: 0.25s ease;
}

.mobile-only {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    color: var(--white);
    box-shadow: 0 14px 30px rgba(16, 164, 107, 0.34);
}

.btn-light {
    background: var(--white);
    color: var(--green-800);
}

.btn-soft {
    background: var(--green-100);
    color: var(--green-800);
}

.btn-outline {
    background: transparent;
    color: var(--green-800);
    border: 1px solid rgba(7, 84, 60, 0.22);
}

.site-header .btn-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-danger {
    background: #d93025;
    color: var(--white);
}

.full {
    width: 100%;
}

.hero-section {
    position: relative;
    min-height: clamp(440px, 62vh, 680px);
    background: url('../img/banner.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 60, 45, 0.88), rgba(6, 60, 45, 0.48), rgba(6, 60, 45, 0.1)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(6, 60, 45, 0.32));
}

.hero-section::after {
    content: "";
    position: absolute;
    width: 700px;
    height: 700px;
    right: -180px;
    top: -160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
    animation: pulseGlow 7s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 32px));
    margin-left: clamp(16px, 8vw, 110px);
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(14px);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 20px 0 12px;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: -1.5px;
}

.hero-content p {
    margin: 0 0 28px;
    max-width: 620px;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.hero-btn {
    min-height: 50px;
    padding-inline: 26px;
    background: var(--white);
    color: var(--green-800);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: -64px;
    position: relative;
    z-index: 2;
}

.stat-card,
.article-card,
.form-card,
.photo-box,
.list-card,
.table-card,
.soon-card,
.auth-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.stat-card {
    padding: 26px;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    background: rgba(23, 199, 131, 0.14);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(6, 60, 45, 0.22);
}

.stat-card h3 {
    margin: 18px 0 8px;
    font-size: 24px;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.content-section,
.dashboard-section,
.account-section,
.coming-soon {
    padding: 70px 0;
}

.section-heading span,
.page-title-block span,
.soon-card span,
.list-head span {
    color: var(--green-700);
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 13px;
}

.section-heading h2,
.page-title-block h1,
.soon-card h1,
.list-head h2 {
    margin: 8px 0 12px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
    color: var(--green-900);
}

.page-title-block p,
.soon-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.article-card {
    padding: clamp(24px, 5vw, 44px);
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--green-700), var(--green-500));
}

.article-card p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.85;
    color: #2f403a;
}

.article-card p:last-child {
    margin-bottom: 0;
}

.toolbar,
.table-actions,
.list-head {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    flex-wrap: wrap;
}

.search-box,
.mini-search {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 280px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--dark);
    background: rgba(255, 255, 255, 0.92);
    outline: none;
    transition: 0.25s ease;
}

input:focus,
textarea:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(23, 199, 131, 0.14);
}

.table-card {
    margin-top: 16px;
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.data-table th,
.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(7, 84, 60, 0.1);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th {
    background: linear-gradient(135deg, var(--green-800), var(--green-600));
    color: var(--white);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.data-table tbody tr {
    transition: 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(231, 255, 244, 0.85);
}

.mark-column {
    display: none;
}

body.mark-mode .mark-column {
    display: table-cell;
}

.avatar-small {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid #e6fff2;
}

.avatar-placeholder {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--green-100);
    color: var(--green-800);
    font-weight: 900;
}

.action-cell,
.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-mini {
    display: inline-flex;
    min-height: 32px;
    padding: 8px 11px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    transition: 0.2s ease;
}

.btn-mini:hover {
    transform: translateY(-1px);
}

.btn-mini.edit {
    background: var(--green-100);
    color: var(--green-800);
}

.btn-mini.danger {
    background: #ffebe9;
    color: #b3261e;
}

.empty-row {
    text-align: center !important;
    color: var(--muted);
    padding: 30px !important;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--white);
    color: var(--green-800);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(6, 60, 45, 0.08);
}

.pagination a.active,
.pagination a:hover {
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
    color: var(--white);
}

.input-layout,
.account-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
    margin-top: 26px;
}

.form-card {
    padding: 24px;
}

.form-card label,
.auth-card label {
    display: block;
    margin-bottom: 15px;
    color: var(--green-900);
    font-weight: 800;
    font-size: 14px;
}

.form-card label input,
.auth-card label input {
    margin-top: 8px;
}

.optional,
.muted {
    color: var(--muted);
    font-weight: 500;
}

.photo-box {
    padding: 24px;
    text-align: center;
    position: sticky;
    top: 145px;
}

.photo-frame {
    aspect-ratio: 4 / 5;
    width: min(320px, 100%);
    margin: 0 auto 18px;
    border-radius: 28px;
    padding: 10px;
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
    box-shadow: 0 18px 42px rgba(6, 60, 45, 0.18);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    background: var(--white);
}

.photo-box h3 {
    margin: 0 0 8px;
    color: var(--green-900);
}

.photo-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.list-card {
    padding: 24px;
    margin-top: 24px;
}

.simple-list {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.simple-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.simple-row strong {
    display: block;
    color: var(--green-900);
}

.simple-row small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.simple-row.empty {
    justify-content: center;
    color: var(--muted);
}

.coming-soon {
    min-height: 54vh;
    display: flex;
    align-items: center;
}

.soon-card {
    width: min(680px, 100%);
    padding: clamp(28px, 6vw, 60px);
    text-align: center;
    margin: 0 auto;
}

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

.logout-btn {
    margin-top: 24px;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(6, 60, 45, 0.96), rgba(16, 164, 107, 0.82)),
        url('../img/banner.png') center/cover no-repeat;
}

.auth-card {
    width: min(440px, 100%);
    padding: 30px;
    background: rgba(255, 255, 255, 0.94);
}

.auth-card.wide-card,
.wide-card {
    width: min(720px, 100%);
}

.auth-logo {
    margin: 0 auto 16px;
}

.auth-card h1 {
    text-align: center;
    margin: 0 0 10px;
    color: var(--green-900);
    font-size: 28px;
}

.auth-card p {
    text-align: center;
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.alert.danger {
    background: #ffebe9;
    color: #b3261e;
}

.alert.success {
    background: var(--green-100);
    color: var(--green-800);
}

.site-footer {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
    color: var(--white);
    font-weight: 900;
    letter-spacing: 0.8px;
}

.reveal-up {
    animation: revealUp 0.8s ease both;
}

.delay-1 {
    animation-delay: 0.15s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.float-card {
    animation: floatSoft 5s ease-in-out infinite;
}

.delay-float {
    animation-delay: 0.8s;
}

.delay-float-2 {
    animation-delay: 1.4s;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes shineHeader {
    0%, 55% {
        transform: translateX(-120%);
    }
    85%, 100% {
        transform: translateX(120%);
    }
}

@media (max-width: 900px) {
    .header-main {
        grid-template-columns: 60px 1fr 54px;
        padding: 0 16px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .hamburger {
        display: block;
    }

    .nav-tabs {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .nav-tabs.open {
        display: flex;
        animation: revealUp 0.25s ease both;
    }

    .nav-tabs > a,
    .nav-dropdown > a {
        width: 100%;
        display: block;
        padding: 13px 14px;
    }

    .nav-dropdown {
        display: none;
    }

    .mobile-login {
        margin-top: 8px;
    }

    .stats-section,
    .input-layout,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .stats-section {
        margin-top: -42px;
    }

    .photo-box {
        position: relative;
        top: 0;
    }

    .toolbar,
    .table-actions,
    .list-head,
    .simple-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box,
    .mini-search {
        min-width: 100%;
        flex-direction: column;
    }

    .hero-content {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 560px) {
    .brand-left img,
    .auth-logo {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .header-title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .hero-section {
        min-height: 520px;
    }

    .stats-section {
        gap: 16px;
    }

    .stat-card,
    .form-card,
    .photo-box,
    .list-card,
    .auth-card {
        border-radius: 20px;
        padding: 20px;
    }

    .content-section,
    .dashboard-section,
    .account-section,
    .coming-soon {
        padding: 46px 0;
    }

    .action-cell,
    .row-actions {
        width: 100%;
    }

    .btn-mini {
        flex: 1;
    }
}
