/* Bunga Burger Brand System - Matched to bungaburger.com */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Exact colors from bungaburger.com */
    --brand-gold: #F9AE02;
    --brand-gold-light: #FBBE33;
    --brand-gold-dark: #D49200;
    --brand-blue: #046BD2;
    --brand-blue-hover: #045CB4;
    --dark-slate: #1E293B;
    --medium-slate: #334155;
    --light-gray: #64748B;
    --accent-gray: #ADB6BE;
    --bg-main: #F0F5FA;
    --bg-white: #FFFFFF;
    --bg-subtle: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --success: #43751E;
    --success-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF9C3;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    /* Matching bungaburger.com: 4px radius, subtle shadows */
    --radius: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow: 0px 4px 10px -2px rgba(0,0,0,0.08);
    --shadow-lg: 0px 8px 20px -4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease-in-out;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.65;
    font-size: 14px;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

/* ============================================================ */
/* SIDEBAR                                                       */
/* ============================================================ */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    background: var(--dark-slate);
    color: white;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 0 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}

.sidebar-logo img { height: 30px; width: auto; }

.sidebar-nav { flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--brand-blue); color: white; font-weight: 600; }

/* ============================================================ */
/* MAIN CONTENT                                                  */
/* ============================================================ */
.main { margin-left: 220px; padding: 24px 28px; max-width: 1200px; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title { font-size: 22px; color: var(--dark-slate); }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.filter-select, .filter-input {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: white;
    color: var(--text-primary);
    height: 34px;
    transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus { border-color: var(--brand-blue); outline: none; }

.filter-group { display: flex; align-items: center; gap: 4px; }
.filter-input { width: 130px; }

/* ============================================================ */
/* CARDS                                                         */
/* ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-lg); }

.card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.card-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-slate);
    line-height: 1.2;
}

.card-value.gold { color: var(--brand-gold-dark); }
.card-value.blue { color: var(--brand-blue); }
.card-value.green { color: var(--success); }
.card-value.red { color: var(--danger); }

.card.mini { padding: 10px 14px; }
.card.mini .card-label { font-size: 10px; margin-bottom: 3px; }
.card.mini .card-value { font-size: 17px; }

/* ============================================================ */
/* TABLES                                                        */
/* ============================================================ */
.table-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title { font-size: 15px; font-weight: 600; }

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

th {
    text-align: left;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}

tr:hover td { background: var(--bg-subtle); }
tr.alert td { background: var(--danger-light); }
tr.weekend td { background: #FFFBEB; }
tr.weekend.alert td { background: var(--danger-light); }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-high { background: var(--success-light); color: #166534; }
.badge-medium { background: var(--warning-light); color: #854D0E; }
.badge-low { background: var(--danger-light); color: #991B1B; }
.badge-alert { background: var(--danger); color: white; }

/* Team badges */
.team-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 2px;
}
.team-badge.resp { background: #FEF3C7; color: #92400E; }
.team-badge.sr { background: #DBEAFE; color: #1E40AF; }
.team-badge.jr { background: var(--bg-subtle); color: #475569; }

/* ============================================================ */
/* HEATMAP                                                       */
/* ============================================================ */
.heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.heatmap-day {
    aspect-ratio: 1;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.heatmap-day:hover { transform: scale(1.08); box-shadow: var(--shadow-lg); z-index: 2; }

.heatmap-day .day-num { font-weight: 700; font-size: 13px; }
.heatmap-day .day-rev { font-size: 9px; opacity: 0.75; }
.heatmap-day .day-team { font-size: 8px; opacity: 0.6; font-weight: 600; }

.heat-1 { background: #E8F0FE; color: var(--brand-blue); }
.heat-2 { background: #B6D4F7; color: #034AA6; }
.heat-3 { background: var(--brand-blue); color: white; }
.heat-4 { background: var(--brand-gold-light); color: var(--dark-slate); }
.heat-5 { background: var(--brand-gold); color: var(--dark-slate); font-weight: 700; }

.heatmap-day.today { outline: 2px solid var(--danger); outline-offset: -1px; }

/* ============================================================ */
/* CHARTS                                                        */
/* ============================================================ */
.chart-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 18px;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.chart-title small { font-weight: 400; color: var(--text-muted); }

/* ============================================================ */
/* AI / CHAT                                                     */
/* ============================================================ */
.ai-card {
    background: linear-gradient(135deg, var(--dark-slate) 0%, #2D3B4F 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.ai-card h3 { color: var(--brand-gold); margin-bottom: 10px; font-size: 16px; }
.ai-card p { color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 6px; font-size: 13px; }

.chat-history {
    min-height: 100px;
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 6px;
}

.chat-msg {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.65;
}

.chat-msg.user { background: rgba(255,255,255,0.04); border-left: 3px solid var(--brand-gold); }
.chat-msg.ai { background: rgba(255,255,255,0.07); border-left: 3px solid var(--brand-blue); }

/* ============================================================ */
/* INFO BOX                                                      */
/* ============================================================ */
.info-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-left: 3px solid var(--brand-blue);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 12px;
    color: #1E40AF;
    line-height: 1.6;
    margin-bottom: 14px;
}

/* ============================================================ */
/* BUTTONS                                                       */
/* ============================================================ */
.btn {
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-gold { background: var(--brand-blue); color: white; }
.btn-gold:hover { background: var(--brand-blue-hover); }
.btn-blue { background: var(--brand-blue); color: white; }
.btn-blue:hover { background: var(--brand-blue-hover); }

/* ============================================================ */
/* EMPLOYEE                                                      */
/* ============================================================ */
.employee-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    margin-bottom: 4px;
    transition: background 0.15s;
}
.employee-card:hover { background: var(--bg-subtle); }

.employee-dept {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border);
}

/* ============================================================ */
/* LOGIN                                                         */
/* ============================================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--dark-slate);
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 380px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-box img { height: 36px; margin-bottom: 20px; }

.login-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 14px;
}

.login-error { color: var(--danger); font-size: 13px; margin-bottom: 10px; }

/* ============================================================ */
/* RESPONSIVE                                                    */
/* ============================================================ */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding: 14px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .heatmap { gap: 2px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filters { width: 100%; }
}
