/* ================================================================
   ØK Rengøring – Site CSS
   Modern, clean design built on top of Bootstrap 5
================================================================ */

/* ── Custom properties ── */
:root {
    --brand-primary: #0d6efd;
    --brand-dark: #1a1f36;
    --brand-green: #198754;
    --brand-red: #dc3545;
    --brand-orange: #fd7e14;
    --radius: 0.75rem;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.13);
    --transition: 0.18s ease;
}

/* ── Base ── */
html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    background: #f4f6fb;
    color: #212529;
    margin-bottom: 48px;
}

/* ── Navbar – Admin (dark) ── */
.navbar.bg-dark {
    background: linear-gradient(135deg, #1a1f36 0%, #2c3252 100%) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* ── Navbar – Employee (primary) ── */
.navbar.bg-primary {
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 60%, #3d8bfd 100%) !important;
    box-shadow: 0 2px 12px rgba(13,110,253,.30);
}

.navbar-brand {
    font-size: 1.15rem;
    letter-spacing: .01em;
}

.navbar .nav-link {
    border-radius: 0.4rem;
    padding: 0.4rem 0.7rem !important;
    transition: background var(--transition);
}
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
    background: rgba(255,255,255,.12);
}

/* ── Cards ── */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
a.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.card-header {
    border-radius: var(--radius) var(--radius) 0 0 !important;
    border-bottom: 1px solid rgba(0,0,0,.06);
    font-weight: 600;
    padding: 0.85rem 1.25rem;
}

/* ── Check-in / Check-ud status cards ── */
.checkin-card {
    border-left: 4px solid var(--brand-green);
    background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}
.checkout-card {
    border-left: 4px solid var(--brand-red);
}

/* ── Status icons on dashboard ── */
.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.6rem;
}
.status-icon-success { background: #d1fae5; color: var(--brand-green); }
.status-icon-danger  { background: #fde8e8; color: var(--brand-red); }
.status-icon-primary { background: #dbeafe; color: var(--brand-primary); }

/* ── Shortcut tiles (employee dashboard) ── */
.tile-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}
.tile-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ── Tables ── */
.table {
    border-radius: var(--radius);
    overflow: hidden;
}
.table thead th {
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: none;
    padding: 0.75rem 1rem;
}
.table tbody td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
}
.table-responsive {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.table-hover tbody tr:hover {
    background: rgba(13,110,253,.04);
}

/* ── Buttons ── */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    letter-spacing: .01em;
    transition: all var(--transition);
}
.btn-success {
    background: linear-gradient(135deg, #198754, #20a76a);
    border-color: #198754;
}
.btn-success:hover { background: linear-gradient(135deg, #157347, #198754); }

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #e8505f);
    border-color: #dc3545;
}
.btn-danger:hover { background: linear-gradient(135deg, #bb2d3b, #dc3545); }

.btn-primary {
    background: linear-gradient(135deg, #0a58ca, #0d6efd);
    border-color: #0d6efd;
}
.btn-primary:hover { background: linear-gradient(135deg, #084298, #0a58ca); }

.btn-lg { padding: 0.65rem 1.5rem; font-size: 1rem; }

/* ── Badges ── */
.badge {
    font-weight: 500;
    letter-spacing: .02em;
    padding: 0.35em 0.65em;
    border-radius: 0.4rem;
}
.badge-substitute {
    background-color: var(--brand-orange);
    color: #fff;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: var(--radius);
    font-size: 0.92rem;
}
.alert-info    { background: #e0f0ff; color: #0a58ca; }
.alert-success { background: #d1fae5; color: #166534; }
.alert-warning { background: #fef9c3; color: #854d0e; }
.alert-danger  { background: #fde8e8; color: #991b1b; }

/* ── Form controls ── */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1.5px solid #dee2e6;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-size: 0.97rem;
}
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

/* ── Section headings ── */
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
h2 { font-weight: 700; color: var(--brand-dark); }

/* ── Login page ── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 50%, #3d8bfd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
}
.login-card .brand-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0a58ca, #0d6efd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    margin: 0 auto 1rem;
}

/* ── Geolocation status ── */
.geo-status {
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
}

/* ── Stat summary boxes ── */
.stat-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-box-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-box-icon-blue   { background: #dbeafe; color: #1d4ed8; }
.stat-box-icon-green  { background: #d1fae5; color: #15803d; }
.stat-box-icon-orange { background: #ffedd5; color: #c2410c; }
.stat-box-icon-red    { background: #fde8e8; color: #b91c1c; }
.stat-box-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-box-label { font-size: 0.8rem; color: #6b7280; margin-top: 0.1rem; }

/* ── Admin: page header bar ── */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.admin-page-header h2 { margin-bottom: 0; }

/* ── Vikar-period badge ── */
.sub-period {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 400;
}

/* ── Responsive utilities ── */
@media (max-width: 576px) {
    .card-body { padding: 1rem; }
    .btn-lg { font-size: 0.95rem; }
    .login-card { padding: 1.75rem 1.25rem; }
}
