/* Olympos Gold — Vardiya Yönetimi teması */
:root {
    --sidebar: #0d0d12;
    --sidebar-2: #16161d;
    --gold: #c9a227;
    --gold-light: #e6c453;
    --gold-dark: #a5851d;
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #17181d;
    --muted: #8a8f98;
    --line: #e8eaee;
    --danger: #d64545;
    --ok: #2da44e;
    --warn: #e0a800;
    --radius: 14px;
    --sidebar-w: 250px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: var(--sidebar); color: #cfd2d8;
    display: flex; flex-direction: column; z-index: 50;
}
.sidebar-logo {
    padding: 26px 22px; font-size: 22px; font-weight: 900; letter-spacing: 2px;
    color: #fff; font-style: italic;
}
.sidebar-logo span { display: block; font-size: 14px; color: var(--gold); letter-spacing: 6px; }
.sidebar nav { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    border-radius: 10px; color: #b9bdc6; font-weight: 500; border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: var(--sidebar-2); color: #fff; }
.sidebar nav a.active {
    background: var(--sidebar-2); color: #fff; border-left-color: var(--gold);
}
.nav-icon { width: 20px; text-align: center; }
.sidebar-bottom { padding: 14px; }
.brandchip {
    display: flex; align-items: center; gap: 10px; background: var(--sidebar-2);
    border-radius: 12px; padding: 12px; color: #fff;
}
.brandchip small { display: block; color: var(--muted); }
.brandchip-icon {
    width: 36px; height: 36px; border-radius: 50%; background: var(--gold);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}

/* ---------- Main / topbar ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 16px 28px; display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 18px; }
.topbar h1 { font-size: 21px; font-weight: 800; }
.topbar-date { color: var(--muted); font-size: 13px; border-left: 1px solid var(--line); padding-left: 18px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.userchip { display: flex; align-items: center; gap: 10px; }
.userchip-text small { display: block; color: var(--muted); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--sidebar);
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.content { padding: 24px 28px; flex: 1; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
    background: var(--card); border-radius: var(--radius); padding: 18px 20px;
    display: flex; align-items: center; gap: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px; font-size: 22px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon.dark { background: var(--sidebar); }
.stat-icon.gold { background: var(--gold); }
.stat-card h3 { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-card .num { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-card small { color: var(--muted); }

.card {
    background: var(--card); border-radius: var(--radius); padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { font-size: 16px; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

/* ---------- Buttons / badges / forms ---------- */
.btn {
    display: inline-block; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--card); font-weight: 600; cursor: pointer; font-size: 13px; color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-dark { background: var(--sidebar); border-color: var(--sidebar); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px;
    font-weight: 700; background: #eef0f3; color: #555;
}
.badge-gold { background: #f7efd4; color: var(--gold-dark); }
.badge-danger { background: #fbe3e3; color: var(--danger); }
.badge-ok { background: #dff5e5; color: var(--ok); }
.badge-warn { background: #fdf3d5; color: #9c7c00; }

label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: 13px; }
input, select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-light); border-color: var(--gold); }
input[type="checkbox"] { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.alert-danger { background: #fbe3e3; color: var(--danger); }
.alert-success { background: #dff5e5; color: var(--ok); }
.alert-info { background: #e3ecfb; color: #2b5fb8; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: #fafbfc; }

/* ---------- Plan grid ---------- */
.plan-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.week-nav { display: flex; align-items: center; gap: 8px; }
.plan-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.plan-table th, .plan-table td { border: 1px solid var(--line); vertical-align: top; }
.plan-table th { background: #fafbfc; text-align: center; padding: 10px 6px; }
.plan-table th.today-col { background: var(--sidebar); color: #fff; }
.plan-table td { padding: 8px; min-height: 70px; }
.plan-table .slot-label { background: #fafbfc; font-weight: 700; white-space: nowrap; width: 110px; text-align: center; vertical-align: middle; }
.cell-missing { outline: 2px solid var(--danger); outline-offset: -2px; background: #fff7f7; }
.missing-note { color: var(--danger); font-size: 11px; font-weight: 700; margin-top: 4px; }
.chip {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    background: #f2f3f6; border-radius: 8px; padding: 4px 8px; margin-bottom: 4px; font-size: 12px; font-weight: 600;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-bekliyor { background: #c5c9d0; }
.dot-geldi { background: var(--ok); }
.dot-gec { background: var(--warn); }
.dot-gelmedi { background: var(--danger); }
.chip button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 2px; }
.chip button:hover { color: var(--danger); }
.add-btn {
    width: 100%; border: 1px dashed var(--line); background: none; border-radius: 8px;
    color: var(--muted); cursor: pointer; padding: 4px; font-size: 12px;
}
.add-btn:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ---------- Modal ---------- */
.modal-back {
    position: fixed; inset: 0; background: rgba(10,10,14,.55); z-index: 100;
    display: flex; align-items: center; justify-content: center;
}
.modal {
    background: #fff; border-radius: var(--radius); padding: 22px; width: 420px; max-width: 92vw;
    max-height: 80vh; overflow: auto;
}
.modal h3 { margin-bottom: 4px; }
.modal .muted { color: var(--muted); margin-bottom: 14px; }
.cand { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.cand small { color: var(--danger); display: block; }
.hidden { display: none !important; }

/* ---------- Calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dayname { text-align: center; color: var(--muted); font-weight: 700; font-size: 12px; padding: 6px 0; }
.cal-cell {
    background: #fafbfc; border: 1px solid var(--line); border-radius: 10px;
    min-height: 74px; padding: 8px; display: block;
}
.cal-cell:hover { border-color: var(--gold); }
.cal-cell.other { opacity: .35; }
.cal-cell.today { border: 2px solid var(--gold); }
.cal-num { font-weight: 800; }
.cal-info { font-size: 11px; color: var(--muted); margin-top: 6px; }
.cal-info.low { color: var(--danger); font-weight: 700; }

/* ---------- Mini calendar (dashboard) ---------- */
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.mini-cal .mh { color: var(--muted); font-weight: 700; padding: 4px 0; }
.mini-cal .md { padding: 6px 0; border-radius: 50%; }
.mini-cal .md.today { background: var(--gold); color: #fff; font-weight: 800; }
.mini-cal .md.other { opacity: .3; }

/* ---------- Attendance ---------- */
.att-group { margin-bottom: 18px; }
.att-group h3 { font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.att-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.att-btns { display: flex; gap: 6px; }
.att-btn { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; }
.att-btn.on-geldi { background: var(--ok); color: #fff; border-color: var(--ok); }
.att-btn.on-gec { background: var(--warn); color: #fff; border-color: var(--warn); }
.att-btn.on-gelmedi { background: var(--danger); color: #fff; border-color: var(--danger); }
.att-btn.on-bekliyor { background: var(--sidebar); color: #fff; border-color: var(--sidebar); }

/* ---------- Announcements / lists ---------- */
.ann { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.ann.onemli { border-color: var(--gold); background: #fffdf4; }
.ann-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ann-head strong { font-size: 14px; }
.ann p { color: #444; margin: 4px 0 8px; }
.ann small { color: var(--muted); }

.duty-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.duty-row:last-child { border-bottom: none; }
.duty-row .time { margin-left: auto; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ---------- Login ---------- */
.login-page {
    background: var(--sidebar); min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    background: var(--card); border-radius: 18px; padding: 36px; width: 380px; max-width: 92vw;
}
.login-logo { font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: 2px; text-align: center; }
.login-logo span { display: block; color: var(--gold); font-size: 15px; letter-spacing: 8px; }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 20px; }
.login-box .btn { margin-top: 18px; }

.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.mb0 { margin-bottom: 0; }

/* ---------- Responsive ---------- */
.menu-btn {
    display: none; background: none; border: none; font-size: 22px; cursor: pointer;
    padding: 2px 6px; line-height: 1; color: var(--text);
}
.sidebar-back { display: none; }

/* Tablet: kenar menü ikon rayına düşer */
@media (max-width: 980px) and (min-width: 701px) {
    :root { --sidebar-w: 64px; }
    .sidebar-logo { font-size: 0; padding: 18px 8px; }
    .sidebar-logo span { font-size: 11px; letter-spacing: 1px; text-align: center; }
    .sidebar nav a { justify-content: center; padding: 12px 6px; font-size: 0; }
    .sidebar nav a .nav-icon { font-size: 17px; }
    .sidebar-bottom { display: none; }
}

@media (max-width: 980px) {
    .grid-2 { grid-template-columns: 1fr; }
    .topbar-date { display: none; }
    .content { padding: 16px; }
}

/* Telefon: kenar menü gizli, hamburger ile çekmece olarak açılır */
@media (max-width: 700px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
        width: 250px; transform: translateX(-100%);
        transition: transform .25s ease; box-shadow: 4px 0 24px rgba(0,0,0,.35);
    }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-back {
        display: block; position: fixed; inset: 0; background: rgba(10,10,14,.5); z-index: 45;
    }
    .menu-btn { display: block; }

    .topbar { padding: 12px 14px; }
    .topbar-left { gap: 10px; }
    .topbar h1 { font-size: 17px; }
    .userchip-text { display: none; }
    .content { padding: 12px; }

    .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 12px 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .stat-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
    .stat-card .num { font-size: 22px; }

    .card { padding: 14px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* Geniş tablolar kart içinde yatay kayar */
    table:not(.plan-table) { display: block; overflow-x: auto; }
    table:not(.plan-table) th, table:not(.plan-table) td { white-space: nowrap; }

    .att-row { flex-wrap: wrap; gap: 8px; }
    .att-btns { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
    .att-btn { padding: 5px 9px; }

    .cal-cell { min-height: 52px; padding: 5px; border-radius: 8px; }
    .cal-info { font-size: 9px; }
    .cal-num { font-size: 12px; }

    .plan-toolbar { flex-direction: column; align-items: stretch; }
    .plan-toolbar form { display: flex; }
    .plan-toolbar form .btn { flex: 1; }

    .duty-row .time { font-size: 12px; }
    .modal { padding: 16px; }
    .login-box { padding: 24px; }
}
