:root {
    --bg-start: #f4efe6;
    --bg-end: #dfe8f5;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-dark: #102033;
    --surface-dark-soft: rgba(16, 32, 51, 0.9);
    --primary: #0f6c5f;
    --primary-dark: #0a4f46;
    --accent: #f08a24;
    --accent-soft: #fff1e2;
    --text-main: #16202a;
    --text-muted: #5f6b76;
    --border-soft: rgba(20, 38, 58, 0.1);
    --shadow-lg: 0 24px 60px rgba(16, 32, 51, 0.14);
    --shadow-md: 0 14px 36px rgba(16, 32, 51, 0.1);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(240, 138, 36, 0.24), transparent 28%),
        radial-gradient(circle at right 20%, rgba(15, 108, 95, 0.18), transparent 24%),
        linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, var(--surface-dark), #0d1724);
    color: #eef5fb;
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #ffc56f);
    color: #1b1b1b;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(240, 138, 36, 0.28);
}

.sidebar-note {
    margin: 1.5rem 0 0;
    color: rgba(238, 245, 251, 0.72);
    font-size: 0.95rem;
    line-height: 1.7;
}

.sidebar-nav {
    margin-top: 2rem;
    display: grid;
    gap: 0.75rem;
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(238, 245, 251, 0.92);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.nav-card:hover,
.nav-card.active {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.nav-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
}

.nav-card.active .nav-icon {
    background: linear-gradient(135deg, var(--accent), #ffca77);
    color: #1e1e1e;
}

.nav-title {
    display: block;
    font-weight: 600;
}

.nav-subtitle {
    display: block;
    font-size: 0.84rem;
    color: rgba(238, 245, 251, 0.64);
}

.app-main {
    padding: 1.5rem;
}

.page-wrap {
    max-width: 1180px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 1.35rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 700;
}

.page-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.topbar-badge {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #9a5413;
    font-weight: 600;
    white-space: nowrap;
}

.topbar-actions,
.logout-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-section {
    margin-bottom: 1.5rem;
}

.hero-panel,
.glass-card,
.form-shell,
.data-panel,
.details-card,
.privacy-card,
.error-card {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.hero-panel {
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.hero-copy p {
    margin: 1rem 0 0;
    max-width: 42rem;
    font-size: 1.06rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-tile {
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--border-soft);
}

.stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
}

.stat-label {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.hero-aside {
    padding: 1.5rem;
    border-radius: calc(var(--radius-xl) - 6px);
    background: linear-gradient(180deg, rgba(16, 32, 51, 0.96), rgba(14, 26, 42, 0.92));
    color: #eef5fb;
}

.hero-aside .section-title,
.section-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.hero-list {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.hero-list li {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.hero-list strong,
.metric-value {
    display: block;
    font-size: 1.15rem;
}

.hero-list span,
.metric-label {
    color: rgba(238, 245, 251, 0.7);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.glass-card {
    padding: 1.5rem;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 108, 95, 0.14), rgba(240, 138, 36, 0.2));
    font-size: 1.25rem;
}

.feature-card h3,
.feature-card p {
    margin: 0;
}

.feature-card p {
    margin-top: 0.75rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.metric-stack {
    display: grid;
    gap: 1rem;
}

.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--border-soft);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin: 0;
}

.section-heading p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.8rem 1.2rem;
    border-width: 0;
}

.btn-primary,
.btn-success {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 24px rgba(15, 108, 95, 0.24);
}

.btn-primary:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-success:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #118577, #0b5d52);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-warning {
    border: 1px solid rgba(16, 32, 51, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-main);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-warning:hover {
    background: #ffffff;
    color: var(--text-main);
}

.btn-warning {
    color: #1c232b;
    background: linear-gradient(135deg, #ffcb74, var(--accent));
}

.btn-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #d9534f, #a83232);
}

.btn-link {
    padding-inline: 0;
    color: var(--primary);
}

.dashboard-toolbar,
.list-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.toolbar-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-form .form-control {
    min-width: min(100%, 320px);
}

.data-panel {
    padding: 1.5rem;
}

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

.table {
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.56);
    --bs-table-hover-bg: rgba(240, 138, 36, 0.08);
    vertical-align: middle;
}

.table thead th {
    padding: 1rem;
    border-bottom: 0;
    background: var(--surface-dark-soft);
    color: #eef5fb;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 1rem;
    border-color: rgba(16, 32, 51, 0.08);
}

.employee-name {
    font-weight: 700;
}

.employee-meta {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 108, 95, 0.1);
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: rgba(240, 138, 36, 0.14);
    color: #a15c1b;
    font-weight: 600;
}

.empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.form-shell,
.details-card,
.privacy-card,
.error-card {
    padding: clamp(1.4rem, 3vw, 2.2rem);
}

.form-header,
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.form-header h2,
.details-header h2,
.privacy-card h1,
.error-card h1 {
    margin: 0;
}

.form-header p,
.details-header p,
.privacy-card p,
.error-card p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.field-block {
    display: grid;
    gap: 0.5rem;
}

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

.form-label {
    font-weight: 600;
    color: #21313f;
}

.form-control {
    min-height: 3.2rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(16, 32, 51, 0.12);
    background: rgba(255, 255, 255, 0.86);
}

.form-control:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-check-input:focus {
    border-color: rgba(15, 108, 95, 0.42);
    box-shadow: 0 0 0 0.25rem rgba(15, 108, 95, 0.14);
}

.validation-summary-errors,
.text-danger {
    color: #b23b3b !important;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.detail-item {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border-soft);
}

.detail-item dt {
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-item dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.danger-banner {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(217, 83, 79, 0.1);
    color: #8f2d2a;
    border: 1px solid rgba(217, 83, 79, 0.18);
}

.footer-note {
    margin-top: 1.5rem;
    padding: 0.5rem 0 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

.mobile-nav {
    display: none;
}

.login-page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-wrap {
    width: min(100%, 1120px);
}

.login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 1.5rem;
    align-items: stretch;
}

.login-copy,
.login-card {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.login-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-copy h1 {
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.05;
}

.login-copy p {
    margin: 1rem 0 0;
    max-width: 34rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.login-hint {
    display: grid;
    gap: 0.85rem;
    margin-top: 2rem;
}

.hint-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border-soft);
}

.hint-label {
    color: var(--text-muted);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .mobile-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .hero-grid,
    .card-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .topbar-actions,
    .dashboard-toolbar,
    .list-toolbar,
    .section-heading,
    .form-header,
    .details-header {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-badge {
        width: fit-content;
    }

    .login-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }

    .app-main {
        padding: 1rem;
    }

    .topbar,
    .glass-card,
    .form-shell,
    .data-panel,
    .details-card,
    .privacy-card,
    .error-card {
        border-radius: 20px;
    }

    .hero-copy h1 {
        font-size: 2rem;
    }

    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .search-form,
    .toolbar-actions,
    .inline-actions,
    .hero-actions,
    .logout-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form .form-control,
    .btn,
    .topbar-badge {
        width: 100%;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        padding: 1rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: inset 0 0 0 1px rgba(16, 32, 51, 0.08);
    }

    .table tbody {
        display: grid;
        gap: 1rem;
    }

    .table td {
        padding: 0.45rem 0;
        border: 0;
        text-align: left !important;
    }

    .table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: var(--text-muted);
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}
