:root {
    --bg: #080808;
    --card: rgba(255, 255, 255, 0.92);
    --card-dark: #111111;
    --text: #111111;
    --muted: #6f6f6f;
    --gold: #d6b36a;
    --gold-dark: #9b7935;
    --border: rgba(0, 0, 0, 0.10);
    --soft: #f8f4ed;
    --danger: #b3261e;
    --success: #1f7a4d;
    --warning: #b7791f;
    --info: #375a9e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

.employee-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(214, 179, 106, 0.28), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(135deg, #080808, #15120d 48%, #070707);
    padding: 36px 16px;
    position: relative;
    overflow-x: hidden;
}

.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.32;
    pointer-events: none;
}

.orb-one { width: 280px; height: 280px; background: var(--gold); top: -80px; right: -60px; }
.orb-two { width: 220px; height: 220px; background: #ffffff; bottom: -80px; left: -60px; }

.page-shell {
    width: min(980px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    margin-bottom: 24px;
}

.brand-logo-wrap {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 18px 44px rgba(214, 179, 106, 0.22);
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
}

.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7px;
}

.brand-logo-wrap.logo-fallback::after {
    content: "TU";
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold), #fff1bd);
    color: #111;
    font-weight: 900;
    letter-spacing: -1px;
}

.login-logo {
    width: 78px;
    height: 78px;
    border-radius: 24px;
    margin: 0 auto 16px;
}

.topbar-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.admin-brand-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 800;
}

h1, h2 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.brand-header h1 { font-size: clamp(34px, 7vw, 64px); }

.subheading {
    color: rgba(255, 255, 255, 0.72);
    margin: 8px 0 0;
}

.dark-text { color: var(--muted) !important; }

.premium-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 38px);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

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

label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
    color: #151515;
}

input, select, textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    padding: 14px 15px;
    font: inherit;
    outline: none;
    color: #111;
    transition: 0.2s ease;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 4px rgba(214, 179, 106, 0.18);
    background: #fff;
}

small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.4;
}

.field-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12) !important;
}

.form-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.primary-btn, .small-btn {
    border: none;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #111, #2a2419);
    color: #fff;
    font-weight: 900;
    padding: 14px 22px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
    transition: 0.2s ease;
}

.primary-btn:hover, .small-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.primary-btn.full { width: 100%; }
.primary-btn.as-link { color: #fff; }

.ghost-link {
    color: #111;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}

.ghost-link.centered {
    display: inline-block;
    text-align: center;
    width: 100%;
    margin-top: 18px;
}

.hidden-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.alert-success {
    background: rgba(31, 122, 77, 0.12);
    color: #0f5e38;
    border: 1px solid rgba(31, 122, 77, 0.24);
}

.alert-error {
    background: rgba(179, 38, 30, 0.10);
    color: #8c1d18;
    border: 1px solid rgba(179, 38, 30, 0.22);
}

.toast-message {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 14px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 99;
    font-weight: 800;
}

.admin-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(214, 179, 106, 0.18), transparent 30%),
        linear-gradient(135deg, #050505, #15120d);
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.94);
    padding: 34px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-card .subheading {
    color: var(--muted);
    margin-bottom: 22px;
}

.login-card form { text-align: left; }

.dashboard-page {
    min-height: 100vh;
    background: #f3efe7;
}

.admin-topbar {
    background: #080808;
    color: #fff;
    padding: 24px clamp(18px, 5vw, 46px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.admin-topbar h1 { font-size: clamp(28px, 4vw, 44px); }

.admin-topbar nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-topbar nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.admin-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 26px auto 60px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.06);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 34px;
    letter-spacing: -0.04em;
}

.admin-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1.4fr auto auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.small-btn {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.small-btn.secondary {
    background: #eee;
    color: #111;
    box-shadow: none;
}

.small-btn.export {
    background: var(--gold);
    color: #111;
    box-shadow: none;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    vertical-align: top;
}

.data-table th {
    background: #111;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table tr:hover td { background: #faf7f0; }
.empty-state { text-align: center; color: var(--muted); padding: 36px !important; }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

.status-completed { background: rgba(31, 122, 77, 0.12); color: var(--success); }
.status-progress { background: rgba(55, 90, 158, 0.12); color: var(--info); }
.status-blocked { background: rgba(179, 38, 30, 0.12); color: var(--danger); }
.status-review { background: rgba(183, 121, 31, 0.14); color: var(--warning); }

.view-link {
    color: #111;
    font-weight: 900;
    text-decoration: none;
    border-bottom: 2px solid var(--gold);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.pagination a {
    color: #111;
    font-weight: 900;
    text-decoration: none;
    background: #eee;
    padding: 10px 14px;
    border-radius: 999px;
}

.detail-card { background: #fff; }

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

.detail-header h2 { font-size: clamp(28px, 4vw, 46px); }
.detail-header .subheading { color: var(--muted); }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.meta-grid div {
    background: var(--soft);
    border-radius: 16px;
    padding: 16px;
}

.meta-grid span, .detail-block span {
    display: block;
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 7px;
}

.meta-grid strong {
    display: block;
    font-size: 16px;
}

.detail-block {
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-block p {
    margin: 0;
    line-height: 1.65;
    color: #222;
}

@media (max-width: 880px) {
    .form-grid, .stat-grid, .meta-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .admin-topbar { align-items: flex-start; flex-direction: column; }
    .admin-brand-row { align-items: flex-start; }
}

@media (max-width: 620px) {
    .employee-page { padding: 20px 12px; }
    .brand-header { align-items: flex-start; flex-direction: column; }
    .premium-card { border-radius: 22px; }
    .login-card { padding: 24px; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .primary-btn, .ghost-link { width: 100%; text-align: center; }
}

@media print {
    body { background: #fff !important; }
    .no-print, .admin-topbar { display: none !important; }
    .admin-shell { width: 100%; margin: 0; }
    .premium-card { box-shadow: none; border: none; }
}
