:root {
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --text: #172033;
    --muted: #667085;
    --line: #dbe4ef;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --accent: #0f766e;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
    --danger-line: #fecaca;
    --success-bg: #f0fdf4;
    --success-text: #166534;
    --success-line: #bbf7d0;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.05);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 22%),
        linear-gradient(180deg, #f7fafe 0%, var(--bg) 100%);
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: #edf2ff;
    padding: 2px 6px;
    border-radius: 6px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219, 228, 239, 0.9);
}

.topbar-inner,
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.topbar-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.brand p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.brand-link {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
}

.brand-link:hover {
    text-decoration: none;
}

.container {
    padding-top: 42px;
    padding-bottom: 48px;
}

.grid-login {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.login-single {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12px;
}

.panel,
.card,
.tile {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 34px;
}

.card {
    padding: 28px;
}

.login-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.tile {
    padding: 22px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tile:hover,
.list-item:hover,
.note:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: #cfdbea;
}

.badge {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8efff 0%, #eefaf8 100%);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.hero-title {
    margin: 0 0 16px;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.muted {
    color: var(--muted);
    line-height: 1.75;
}

.info-box {
    margin-top: 26px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #d7e3f0;
    background: linear-gradient(180deg, #f8fbff 0%, #f4fbff 100%);
}

.form-row {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.11);
}

.button,
button {
    display: inline-block;
    padding: 13px 18px;
    border-radius: 14px;
    border: 1px solid var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover,
button:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1d4ed8 100%);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(29, 78, 216, 0.18);
}

.button-secondary {
    background: #fff;
    color: var(--text);
    border-color: #cfd8e3;
    box-shadow: none;
}

.button-secondary:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.error {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--danger-line);
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 14px;
}

.success {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--success-line);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 14px;
}

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

.dashboard-header h2 {
    margin: 8px 0 10px;
    font-size: 34px;
    letter-spacing: -0.02em;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 22px;
    margin-bottom: 28px;
}

.tile:nth-child(1) {
    border-top: 4px solid #2563eb;
}

.tile:nth-child(2) {
    border-top: 4px solid #0f766e;
}

.tile:nth-child(3) {
    border-top: 4px solid #7c3aed;
}

.tile:nth-child(4) {
    border-top: 4px solid #ea580c;
}

.tile h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.tile p,
.list-item p,
.note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.list-item,
.note {
    padding: 17px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.list-item + .list-item,
.note + .note {
    margin-top: 12px;
}

.section-title {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.section-text {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--muted);
}

.footer-note {
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}

.form-card {
    max-width: 760px;
    margin: 0 auto;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.auth-links {
    margin-top: 18px;
    text-align: left;
}

.auth-links a {
    font-size: 14px;
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 12px;
    border: 1px solid #d8e1ec;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.user-menu-toggle:hover {
    background: #ffffff;
    border-color: #c7d4e4;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    flex: 0 0 38px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.user-role {
    font-size: 12px;
    color: var(--muted);
}

.user-chevron {
    font-size: 12px;
    color: var(--muted);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 50;
}

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

.user-menu-dropdown a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.user-menu-dropdown a:hover {
    background: #f8fbff;
    text-decoration: none;
}


.employee-card {
    border-width: 2px;
}

.employee-card-blue {
    background: #4dabf7;
    border-color: #339af0;
    color: #1f2937;
}

.employee-card-green {
    background: #51cf66;
    border-color: #37b24d;
    color: #1f2937;
}

.employee-card-yellow {
    background: #fcc419;
    border-color: #f59f00;
    color: #1f2937;
}

.employee-card-red {
    background: #ff6b6b;
    border-color: #fa5252;
    color: #1f2937;
}

.employee-card-neutral {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.employee-card p,
.employee-card strong,
.employee-card label {
    color: inherit;
}

.employee-card input {
    background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 980px) {
    .grid-login,
    .content-grid,
    .tiles {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 34px;
    }

    .dashboard-header h2 {
        font-size: 30px;
    }
}

@media (max-width: 640px) {
    .topbar-inner,
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .panel,
    .card,
    .tile {
        border-radius: 20px;
    }

    .hero-title {
        font-size: 28px;
    }

    .user-menu-toggle {
        padding: 8px 10px;
    }

    .user-meta {
        display: none;
    }

    .user-menu-dropdown {
        min-width: 200px;
        right: 0;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .button-row .button,
    .button-row .button-secondary,
    .button-row button {
        width: 100%;
        text-align: center;
    }
}