:root {
    --primary: #1b5bff;
    --primary-dark: #0d2d8f;
    --accent: #f6b801;
    --bg: #f5f7fb;
    --card-bg: #ffffff;
    --text: #1b1b1f;
    --muted: #555a64;
    --border: #e1e5ee;
    --success: #1f9d55;
    --error: #d64545;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.hero {
    position: relative;
    background: url('https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: #fff;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(3rem, 6vw, 4.5rem) 0 6rem;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 46, 149, 0.85), rgba(27, 91, 255, 0.75));
    z-index: 0;
}

.hero__content {
    position: relative;
    padding: 0;
    z-index: 1;
}

.hero__content h1 {
    font-size: clamp(2.3rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
}

.hero__content p {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.button {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: var(--accent);
    color: #1a1b1f;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
}

.button--secondary {
    background: #fff;
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-top: -3rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.stats-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 20px 45px rgba(18, 32, 73, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stats-card h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: var(--muted);
}

.stats-card__metric {
    margin: 0.35rem 0;
    font-size: 1rem;
}

.stats-card__metric span {
    display: inline-block;
    font-weight: 700;
    font-size: 1.8rem;
    margin-right: 0.4rem;
    color: var(--primary);
}

.section {
    margin: 3rem 0;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 18px 40px rgba(18, 32, 73, 0.08);
}

.chart-container {
    position: relative;
    width: 100%;
    height: clamp(280px, 40vw, 420px);
}

#productivityChart {
    width: 100%;
    height: 100%;
    display: block;
}

.section__header h2 {
    margin: 0;
    font-size: 1.6rem;
}

.section__header p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
    border-radius: 14px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: rgba(27, 91, 255, 0.08);
}

table th,
table td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.95rem;
}

table tbody tr:nth-child(even) {
    background: rgba(27, 91, 255, 0.04);
}

.empty-state {
    padding: 2rem;
    background: rgba(27, 91, 255, 0.06);
    border-radius: 16px;
    color: var(--muted);
}

.footer {
    margin-top: 4rem;
    padding: 2rem 0 3rem;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.84);
}

.footer__content {
    text-align: center;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Admin styles */
.admin-body {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.92));
    min-height: 100vh;
    padding: 3rem 1rem;
}

.admin-container {
    width: min(960px, 95%);
    margin: 0 auto;
    color: #0f172a;
}

.admin-header {
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: clamp(2rem, 5vw, 2.6rem);
    margin-bottom: 0.6rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.25);
    margin-bottom: 2rem;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.form {
    display: grid;
    gap: 1rem;
}

.form--grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form__group--full {
    grid-column: 1 / -1;
}

.form__actions {
    display: flex;
    justify-content: flex-end;
}

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

input,
textarea {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(27, 91, 255, 0.15);
}

.alert {
    border-radius: 16px;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.alert--success {
    background: rgba(31, 157, 85, 0.12);
    color: var(--success);
}

.alert--error {
    background: rgba(214, 69, 69, 0.12);
    color: var(--error);
}

@media (max-width: 720px) {
    .section {
        padding: 1.8rem;
    }

    .stats-grid {
        margin-top: -3rem;
    }

    .card {
        padding: 1.6rem;
    }
}
