/* ============ BASE ============ */
* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    background: #f0f2f5;
    color: #1a1a1a;
}

/* ============ HEADER ============ */
.header {
    background: #00a1de;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-left h1,
.header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.header-logo {
    height: 36px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============ LAYOUT ============ */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ============ BUTTONS ============ */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}
.btn-primary   { background: #00a1de; color: white; }
.btn-primary:hover   { background: #008ac2; }
.btn-danger    { background: #e74c3c; color: white; }
.btn-danger:hover    { background: #c0392b; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
}
.icon-btn:hover { background: #f0f0f0; }

.user-icon-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.15s;
    text-decoration: none;
}
.user-icon-btn:hover { background: rgba(255,255,255,0.35); }

/* ============ FORMS ============ */
input, select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}
input:focus, select:focus {
    outline: none;
    border-color: #00a1de;
    box-shadow: 0 0 0 2px rgba(0,161,222,0.2);
}

label {
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
    color: #495057;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field { margin-bottom: 16px; }

.err {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

/* ============ TABLE ============ */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 8px;
    border: 1px solid #dee2e6;
    text-align: left;
    font-size: 14px;
}
th {
    background: #f8f9fa;
    font-weight: 600;
}

.shift-header {
    background: #000;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============ PILLS ============ */
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #e9ecef;
    font-weight: 600;
}
.pill.ch { background: #cfe2ff; color: #084298; }
.pill.w3 { background: #fff3cd; color: #664d03; }

/* ============ SAVE INDICATOR ============ */
.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.save-indicator.show { opacity: 1; }

/* ============ LOGIN ============ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00a1de 0%, #0072c6 100%);
    padding: 20px;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.login-box h1 {
    margin: 0 0 8px;
    color: #00a1de;
    text-align: center;
}
.login-box .sub {
    text-align: center;
    color: #6c757d;
    margin-bottom: 28px;
}

.staff-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}
.staff-link a {
    color: #6c757d;
    text-decoration: none;
}
.staff-link a:hover {
    color: #00a1de;
    text-decoration: underline;
}

/* ============ BIG FORM (registratie) ============ */
.big-form {
    max-width: 600px;
    margin: 40px auto;
}
.big-form input, .big-form select {
    padding: 14px;
    font-size: 16px;
}
.big-form .btn {
    padding: 16px;
    font-size: 17px;
    width: 100%;
}

/* ============ PASSWORD MANAGER ============ */
.pw-grid {
    display: grid;
    gap: 18px;
    margin-top: 12px;
}
.pw-row {
    padding: 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    display: grid;
    gap: 8px;
}
.pw-row code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ============ FOOTER ============ */
.app-footer {
    width: 100%;
    margin-top: 40px;
    padding: 20px 16px;
    background: #e9ecef;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
    border-top: 1px solid #dee2e6;
}
.app-footer strong { color: #495057; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .header {
        padding: 12px 16px;
        gap: 10px;
    }
    .header-left {
        gap: 10px;
        flex: 1 1 100%;
    }
    .header-left h1,
    .header h1 {
        font-size: 17px;
    }
    .header-logo {
        height: 28px;
    }
    .header-right {
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 8px;
    }
    .header-right .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    #dateLabel { font-size: 13px; }

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

    .login-box { padding: 28px 22px; }
}
.login-logo {
    display: block;
    margin: 0 auto 15px auto;
    max-width: 120px;
    height: auto;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}