:root {
    --bg: #f5f8f4;
    --surface: #ffffff;
    --surface-soft: #eef6ef;
    --line: #d5e3d7;
    --text: #1f2a23;
    --muted: #617167;
    --primary: #0f7b47;
    --primary-dark: #0b5d36;
    --accent: #d8f1de;
    --shadow: 0 20px 50px rgba(15, 123, 71, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(125, 194, 146, 0.15), transparent 30%),
        linear-gradient(180deg, #f8fbf7 0%, #eef4ee 100%);
}

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

.landing-shell,
.auth-shell {
    min-height: 100vh;
    padding: 40px 24px;
}

.hero-panel,
.auth-card {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: stretch;
}

.hero-copy,
.auth-side,
.auth-form-panel,
.hero-card,
.content-panel,
.metric-panel,
.feature-box {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(213, 227, 215, 0.95);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-copy,
.auth-side,
.auth-form-panel,
.hero-card {
    padding: 38px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

.hero-copy h1,
.auth-side h1 {
    font-size: clamp(2.4rem, 4vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

.hero-copy p,
.auth-side p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions,
.header-actions,
.quick-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-card {
    display: grid;
    gap: 14px;
    background: linear-gradient(180deg, #164d2d 0%, #0f7b47 100%);
    color: #fff;
}

.stat-card {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.stat-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.feature-grid {
    max-width: 1180px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-box {
    padding: 26px;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e6efe8;
    color: var(--text);
}

.btn-block {
    width: 100%;
}

.bullet-list {
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

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

.stack-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    background: white;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
    outline: 2px solid rgba(15, 123, 71, 0.2);
    border-color: var(--primary);
}

.form-message {
    min-height: 20px;
    margin: 0;
    color: var(--primary-dark);
    font-weight: 600;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.app-sidebar {
    padding: 26px;
    background: linear-gradient(180deg, #143c28 0%, #0f7b47 100%);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.brand-block small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-nav a {
    padding: 13px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.18);
}

.app-content {
    padding: 28px;
}

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

.app-header h1 {
    margin-bottom: 0;
    font-size: 2rem;
}

.user-badge {
    padding: 12px 16px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    font-weight: 700;
}

.dashboard-grid,
.panel-grid,
.management-grid {
    display: grid;
    gap: 20px;
}

.dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 20px;
}

.panel-grid {
    grid-template-columns: 0.95fr 1.05fr;
}

.management-grid {
    grid-template-columns: 0.9fr 1.1fr;
}

.metric-panel,
.content-panel {
    padding: 24px;
}

.metric-panel span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.metric-panel strong {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 8px;
}

.metric-panel small {
    color: var(--muted);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.quick-link {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-weight: 700;
    text-align: center;
}

.menu-tree {
    display: grid;
    gap: 12px;
}

.menu-tree-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.menu-tree-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.menu-tree-children {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-left: 18px;
    border-left: 2px solid var(--line);
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
}

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

.data-table th {
    background: var(--surface-soft);
    font-size: 0.9rem;
}

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

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

.empty-state {
    padding: 18px;
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--muted);
}

@media (max-width: 1080px) {
    .hero-panel,
    .auth-card,
    .app-shell,
    .panel-grid,
    .management-grid,
    .dashboard-grid,
    .feature-grid,
    .quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .landing-shell,
    .auth-shell,
    .app-content,
    .app-sidebar {
        padding: 18px;
    }

    .hero-copy,
    .auth-side,
    .auth-form-panel,
    .hero-card,
    .metric-panel,
    .content-panel {
        padding: 22px;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
    }
}
