/* ═══════════════════════════════════════
   Wafaa Tech — Kiosk Management System
   Brand: #093423 (dark) · #63ebb3 (mint)
   Breakpoints: xs<576 | sm576 | md768 | lg992 | xl1200
   ═══════════════════════════════════════ */

:root {
    --wt-dark:       #093423;
    --wt-dark-2:     #0d4a30;
    --wt-mint:       #63ebb3;
    --wt-mint-2:     #4fd9a0;
    --wt-light:      #f0fdf7;
    --wt-text:       #1a1a1a;
    --wt-shadow:     0 2px 12px rgba(0,0,0,0.08);
    --bottom-nav-h:  64px;
    --navbar-h:      66px;
    --sidebar-w:     220px;
}

/* ── Reset / Base ───────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f7f5;
    color: var(--wt-text);
    -webkit-tap-highlight-color: transparent;
}

/* prevent content going behind bottom nav on mobile */
@media (max-width: 767px) {
    body { padding-bottom: var(--bottom-nav-h); }
}

/* ── Navbar ─────────────────────────── */
.navbar-wt {
    background-color: var(--wt-dark);
    border-bottom: 3px solid var(--wt-mint);
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--navbar-h);
}
.navbar-wt .navbar-brand img { height: 38px; }
.navbar-wt .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
}
.navbar-wt .nav-link:hover { color: var(--wt-mint) !important; }

/* ── Sidebar (md+ = 768px+) ─────────── */
.sidebar {
    background-color: var(--wt-dark);
    min-height: calc(100vh - var(--navbar-h));
    padding-top: 0.5rem;
    position: sticky;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.72);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin: 2px 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--wt-mint);
    color: var(--wt-dark) !important;
}
.sidebar .nav-link i {
    width: 20px;
    margin-right: 7px;
    flex-shrink: 0;
}

/* ── Bottom Nav (mobile only < 768px) ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: var(--wt-dark);
    border-top: 2px solid var(--wt-mint);
    z-index: 1040;
    justify-content: space-around;
    align-items: stretch;
}
@media (max-width: 767px) {
    .bottom-nav { display: flex; }
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    gap: 3px;
    flex: 1;
    min-width: 44px;   /* WCAG touch target */
    min-height: 44px;
    padding: 6px 2px;
    transition: color 0.15s, background 0.15s;
}
.bottom-nav a i { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active,
.bottom-nav a:hover {
    color: var(--wt-mint);
    background: rgba(99,235,179,0.08);
}

/* ── Cards ──────────────────────────── */
.card-wt {
    border: none;
    border-radius: 14px;
    box-shadow: var(--wt-shadow);
    overflow: hidden;
}
.card-wt .card-header {
    background: var(--wt-dark);
    color: white;
    font-weight: 600;
    padding: 0.85rem 1.2rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Stat Cards ─────────────────────── */
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    border-left: 4px solid var(--wt-mint);
    box-shadow: var(--wt-shadow);
    height: 100%;
}
.stat-card .stat-value {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--wt-dark);
    line-height: 1.15;
    word-break: break-all;
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--wt-mint);
    opacity: 0.7;
    flex-shrink: 0;
}

/* ── Buttons ────────────────────────── */
.btn-wt {
    background: var(--wt-dark);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    min-height: 40px;
    transition: background 0.15s, color 0.15s;
}
.btn-wt:hover, .btn-wt:focus {
    background: var(--wt-dark-2);
    color: var(--wt-mint);
}
.btn-wt-mint {
    background: var(--wt-mint);
    color: var(--wt-dark);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    min-height: 40px;
    transition: background 0.15s;
}
.btn-wt-mint:hover, .btn-wt-mint:focus {
    background: var(--wt-mint-2);
    color: var(--wt-dark);
}

/* Mobile touch-friendly buttons */
@media (max-width: 767px) {
    .btn-wt, .btn-wt-mint {
        min-height: 48px;
        border-radius: 12px;
        font-size: 0.95rem;
    }
}

/* ── Forms ──────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    padding: 0.55rem 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 1rem; /* prevents iOS zoom on focus */
}
.form-control:focus, .form-select:focus {
    border-color: var(--wt-mint);
    box-shadow: 0 0 0 3px rgba(99,235,179,0.2);
}
/* Touch-friendly file input */
input[type="file"].form-control { padding: 0.45rem; }

/* ── Login Page ─────────────────────── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(150deg, var(--wt-dark) 0%, var(--wt-dark-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.login-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.login-card .logo-wrap { text-align: center; margin-bottom: 1.5rem; }
.login-card .logo-wrap img { height: 72px; }

@media (max-width: 400px) {
    .login-card { padding: 1.75rem 1.2rem; border-radius: 16px; }
    .login-card .logo-wrap img { height: 56px; }
}

/* ── Tables ─────────────────────────── */
.table-wt thead tr {
    background: var(--wt-dark);
    color: white;
}
.table-wt thead th {
    font-weight: 600;
    border: none;
    padding: 0.7rem 0.9rem;
    white-space: nowrap;
}
.table-wt tbody td { padding: 0.65rem 0.9rem; vertical-align: middle; }

/* Table responsive scrolling with visual hint */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 14px 14px;
}

/* Column hiding utilities */
.d-table-sm-none  { display: table-cell; }
@media (max-width: 575px)  { .d-table-sm-none  { display: none !important; } }
@media (max-width: 767px)  { .d-table-md-none  { display: none !important; } }
@media (max-width: 991px)  { .d-table-lg-none  { display: none !important; } }

/* Mobile table font */
@media (max-width: 767px) {
    .table td, .table th { font-size: 0.83rem; padding: 0.5rem 0.6rem; }
}

/* ── Badge Roles ────────────────────── */
.badge-owner      { background: var(--wt-dark); color: white; }
.badge-supervisor { background: #0d6efd; color: white; }
.badge-employee   { background: var(--wt-mint); color: var(--wt-dark); }

/* ── Alerts ─────────────────────────── */
.alert-success { border-left: 4px solid #198754; }
.alert-warning { border-left: 4px solid #ffc107; }
.alert-danger  { border-left: 4px solid #dc3545; }
.alert-info    { border-left: 4px solid #0dcaf0; }

/* ── Progress bars ──────────────────── */
.progress { background: #e9f7f1; }
.progress-bar { transition: width 0.4s ease; }

/* ── Tabs ───────────────────────────── */
.nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.nav-tabs .nav-link {
    color: #6c757d;
    white-space: nowrap;
    font-size: 0.9rem;
}
.nav-tabs .nav-link.active {
    color: var(--wt-dark);
    font-weight: 700;
    border-bottom: 3px solid var(--wt-mint);
}
@media (max-width: 767px) {
    .nav-tabs .nav-link { font-size: 0.8rem; padding: 0.5rem 0.6rem; }
}

/* ── Photo preview ──────────────────── */
#preview-wrap img {
    border: 3px solid var(--wt-mint);
    border-radius: 10px;
    max-height: clamp(160px, 30vh, 260px);
    width: 100%;
    object-fit: cover;
}

/* ── Page layout max-width (large screens) ── */
@media (min-width: 1400px) {
    .content-area { max-width: 1300px; }
}

/* ── Responsive heading ─────────────── */
h4.fw-bold { font-size: clamp(1rem, 2.5vw, 1.35rem); }

/* ── Kiosk status dots ──────────────── */
.kiosk-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%; display: inline-block; margin-right: 6px;
}
.dot-active   { background: #28a745; }
.dot-inactive { background: #dc3545; }

/* ══ Tablet overrides (768px – 991px) ═══════════════ */
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar .nav-link { font-size: 0.82rem; padding: 0.55rem 0.7rem; }
    .sidebar .nav-link i { margin-right: 5px; }
    .stat-card .stat-value { font-size: 1.4rem; }
    .stat-card { padding: 0.9rem 1rem; }
    .card-wt .card-header { font-size: 0.92rem; }
    .table td, .table th { font-size: 0.85rem; padding: 0.5rem 0.65rem; }
}

/* ══ Desktop overrides (992px+) ═══════════════════ */
@media (min-width: 992px) {
    .login-card { padding: 2.5rem 2.5rem; }
}

/* ══ Small phone overrides (< 400px) ══════════════ */
@media (max-width: 400px) {
    .stat-card { padding: 0.85rem 0.9rem; }
    .stat-card .stat-value { font-size: 1.2rem; }
    .bottom-nav a { font-size: 0.62rem; }
    .bottom-nav a i { font-size: 1.15rem; }
}
