/* ===================================================
   HotelOps - Ana Stil Dosyasi
   Mobile-First, Modern Kurumsal Tasarim
   =================================================== */

/* ---- RESET & VARIABLES ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --bg: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    --header-height: 60px;
    /* Priority */
    --urgent: #EF4444;
    --urgent-bg: #FEF2F2;
    --high: #3B82F6;
    --high-bg: #EFF6FF;
    --normal: #F59E0B;
    --normal-bg: #FFFBEB;
    --low: #22C55E;
    --low-bg: #F0FDF4;
    /* Status */
    --pending: #94A3B8;
    --pending-bg: #F8FAFC;
    --inprogress: #2563EB;
    --inprogress-bg: #DBEAFE;
    --completed: #16A34A;
    --completed-bg: #DCFCE7;
    --delayed: #DC2626;
    --delayed-bg: #FEE2E2;
    --cancelled: #6B7280;
    --cancelled-bg: #F3F4F6;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---- LAYOUT ---- */
.layout-wrapper { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--text-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-height);
}

.sidebar-brand .brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
}

.sidebar-brand .brand-text { line-height: 1.2; }
.sidebar-brand .brand-name { font-size: 13px; font-weight: 700; color: #fff; }
.sidebar-brand .brand-sub { font-size: 10px; color: rgba(255,255,255,.5); }

.sidebar-close {
    display: none;
    position: absolute;
    top: 14px; right: 14px;
    background: none; border: none; color: rgba(255,255,255,.6);
    font-size: 24px; cursor: pointer; line-height: 1;
}

.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section-title {
    font-size: 10px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: rgba(255,255,255,.35);
    padding: 8px 20px 4px;
    margin-top: 8px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: all .15s;
    position: relative;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active {
    background: rgba(37,99,235,.3);
    color: #fff;
}
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--urgent);
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px; text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    border-radius: var(--radius);
    padding: 8px;
    transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,.08); }
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 10px; color: rgba(255,255,255,.5); }

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.avatar-lg { width: 44px; height: 44px; font-size: 14px; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; }

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- HEADER ---- */
.site-header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0; z-index: 50;
    box-shadow: var(--shadow);
}

.hamburger-btn {
    display: none;
    background: none; border: none;
    color: var(--text-muted); font-size: 22px;
    cursor: pointer; padding: 4px;
    line-height: 1;
}

.header-title { font-size: 16px; font-weight: 600; color: var(--text-dark); flex: 1; }
.header-subtitle { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-btn {
    width: 36px; height: 36px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px;
    transition: all .15s;
    position: relative;
}
.header-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    background: var(--urgent);
    color: #fff;
    border-radius: 50%;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* ---- NOTIFICATION DROPDOWN ---- */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    width: 360px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
    max-height: 480px;
    overflow: hidden;
    flex-direction: column;
}
.notif-dropdown.open { display: flex; }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-header h4 { font-size: 13px; font-weight: 600; }
.notif-mark-all { font-size: 11px; color: var(--primary); cursor: pointer; background: none; border: none; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex; gap: 10px;
    transition: background .15s;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #EFF6FF; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notif-dot.urgent { background: var(--urgent); }
.notif-dot.warning { background: var(--normal); }
.notif-dot.success { background: var(--low); }
.notif-dot.info { background: var(--high); }
.notif-content { flex: 1; min-width: 0; }
.notif-content .notif-title { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.notif-content .notif-msg { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-content .notif-time { font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* ---- PAGE CONTENT ---- */
.page-content { padding: 24px; flex: 1; max-width: 1400px; width: 100%; }

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text-dark); }
.page-header .page-header-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---- KPI CARDS ---- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: row; align-items: center; gap: 12px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}
.kpi-info { display: flex; flex-direction: row; align-items: baseline; gap: 8px; flex: 1; flex-wrap: wrap; }
.kpi-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.kpi-card.urgent::before { background: var(--urgent); }
.kpi-card.high::before { background: var(--high); }
.kpi-card.inprogress::before { background: var(--inprogress); }
.kpi-card.completed::before { background: var(--completed); }
.kpi-card.pending::before { background: var(--pending); }
.kpi-card.delayed::before { background: var(--delayed); }

.kpi-icon {
    font-size: 24px;
    width: 44px; height: 44px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
}
.kpi-card.urgent .kpi-icon { background: var(--urgent-bg); }
.kpi-card.high .kpi-icon { background: var(--high-bg); }
.kpi-card.inprogress .kpi-icon { background: var(--inprogress-bg); }
.kpi-card.completed .kpi-icon { background: var(--completed-bg); }
.kpi-card.pending .kpi-icon { background: var(--pending-bg); }
.kpi-card.delayed .kpi-icon { background: var(--delayed-bg); }

.kpi-value { font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-card.urgent .kpi-value { color: var(--urgent); }
.kpi-card.high .kpi-value { color: var(--high); }
.kpi-card.inprogress .kpi-value { color: var(--inprogress); }
.kpi-card.completed .kpi-value { color: var(--completed); }
.kpi-card.pending .kpi-value { color: var(--pending); }
.kpi-card.delayed .kpi-value { color: var(--delayed); }

.kpi-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ---- CARDS ---- */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.card-body { padding: 20px; }

/* ---- BADGES ---- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px; font-weight: 600;
    white-space: nowrap;
}

.badge-urgent { background: var(--urgent-bg); color: var(--urgent); }
.badge-high { background: var(--high-bg); color: var(--high); }
.badge-normal { background: var(--normal-bg); color: #B45309; }
.badge-low { background: var(--low-bg); color: #166534; }
.badge-pending { background: var(--pending-bg); color: var(--pending); border: 1px solid var(--border); }
.badge-inprogress { background: var(--inprogress-bg); color: var(--inprogress); }
.badge-completed { background: var(--completed-bg); color: var(--completed); }
.badge-delayed { background: var(--delayed-bg); color: var(--delayed); }
.badge-cancelled { background: var(--cancelled-bg); color: var(--cancelled); }
.badge-job { background: #F0F9FF; color: #0284C7; }
.badge-fault { background: #FEF2F2; color: #DC2626; }
.badge-maintenance { background: #FFFBEB; color: #D97706; }
.badge-housekeeping { background: #F5F3FF; color: #7C3AED; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px; font-weight: 600;
    cursor: pointer; border: none;
    transition: all .15s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-full { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--bg); border: 1px solid var(--border); color: var(--text-dark); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--urgent); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-success { background: var(--completed); color: #fff; }
.btn-success:hover { background: #15803D; color: #fff; }
.btn-warning { background: var(--normal); color: #fff; }
.btn-warning:hover { background: #D97706; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text-dark); }

/* ---- START JOB BUTTON (most prominent) ---- */
.btn-start {
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    color: #fff;
    font-size: 14px; font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
    transition: all .2s;
}
.btn-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37,99,235,.45);
    color: #fff;
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.form-label .required { color: var(--urgent); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all .15s;
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

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

/* ---- FILTER BAR ---- */
.filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 16px;
}
.filter-bar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-bar .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.filter-bar .search-wrap .form-control { padding-left: 32px; }
.filter-bar .filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- TABLE ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted);
    padding: 10px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    background: var(--bg);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table .td-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* ---- JOB LIST CARD ---- */
.job-list { display: flex; flex-direction: column; gap: 8px; }
.job-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex; gap: 12px; align-items: flex-start;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}
.job-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateX(2px); }
.job-card .priority-strip {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}
.job-card .priority-strip.urgent { background: var(--urgent); }
.job-card .priority-strip.high { background: var(--high); }
.job-card .priority-strip.normal { background: var(--normal); }
.job-card .priority-strip.low { background: var(--low); }
.job-card .job-main { flex: 1; padding-left: 4px; min-width: 0; }
.job-card .job-title { font-size: 14px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card .job-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.job-card .job-meta-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }
.job-card .job-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ---- JOB DETAIL ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item .info-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.info-item .info-value { font-size: 13px; color: var(--text-dark); font-weight: 500; }

.priority-strip-lg {
    height: 5px;
    border-radius: 0;
    margin: -20px -20px 16px;
}
.priority-strip-lg.urgent { background: var(--urgent); }
.priority-strip-lg.high { background: var(--high); }
.priority-strip-lg.normal { background: var(--normal); }
.priority-strip-lg.low { background: var(--low); }

/* ---- CHECKLIST ---- */
.checklist-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border-light);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.checklist-item label { font-size: 13px; cursor: pointer; flex: 1; }
.checklist-item.done label { text-decoration: line-through; color: var(--text-muted); }

/* ---- ACTIVITY LOG ---- */
.activity-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.activity-item:last-child { border-bottom: none; }
.activity-item .activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.activity-item .activity-text { font-size: 12px; color: var(--text-muted); }
.activity-item .activity-text strong { color: var(--text-dark); font-weight: 600; }
.activity-item .activity-time { font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* ---- NOTE ---- */
.note-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.note-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-author { font-size: 12px; font-weight: 600; }
.note-time { font-size: 11px; color: var(--text-muted); }
.note-text { font-size: 13px; color: var(--text-dark); line-height: 1.5; }

/* ---- CALENDAR ---- */
.calendar-wrapper { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.calendar-toolbar {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--bg);
}
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav .cal-title { font-size: 15px; font-weight: 700; color: var(--text-dark); min-width: 180px; text-align: center; }
.cal-view-toggle { display: flex; gap: 2px; background: var(--border); border-radius: var(--radius); padding: 3px; }
.cal-view-btn {
    padding: 5px 12px;
    font-size: 12px; font-weight: 600;
    border: none; cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    background: none;
    color: var(--text-muted);
    transition: all .15s;
}
.cal-view-btn.active { background: var(--bg-white); color: var(--primary); box-shadow: var(--shadow); }

.calendar-grid { overflow-x: auto; }
.cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
}
.cal-day-header {
    padding: 8px;
    text-align: center;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
}
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 500px; }
.cal-cell {
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 4px;
    min-height: 110px;
    position: relative;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other-month { background: var(--border-light); }
.cal-cell.today { background: #EFF6FF; }
.cal-cell-date {
    font-size: 12px; font-weight: 600;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 2px;
}
.cal-cell.today .cal-cell-date { background: var(--primary); color: #fff; }

.cal-event {
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px 0;
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    border-left: 3px solid;
    background: var(--primary-light);
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex; gap: 4px; align-items: center;
    transition: opacity .15s;
}
.cal-event:hover { opacity: .85; }
.cal-event.ev-urgent { border-color: var(--urgent); background: var(--urgent-bg); }
.cal-event.ev-high { border-color: var(--high); background: var(--high-bg); }
.cal-event.ev-normal { border-color: var(--normal); background: var(--normal-bg); }
.cal-event.ev-low { border-color: var(--low); background: var(--low-bg); }
.cal-event.ev-delayed { border-color: var(--delayed); background: var(--delayed-bg); opacity: .9; }

/* ---- WEEK VIEW ---- */
.cal-week-grid { display: grid; grid-template-columns: 60px repeat(7, 1fr); border-collapse: collapse; }
.cal-week-time { font-size: 10px; color: var(--text-muted); text-align: right; padding: 0 6px; }
.cal-week-cell { border: 1px solid var(--border-light); min-height: 48px; padding: 2px; position: relative; }
.cal-week-header { text-align: center; padding: 8px 4px; font-size: 11px; font-weight: 600; background: var(--bg); border-bottom: 1px solid var(--border); }

/* ---- REPORTS ---- */
.chart-container { position: relative; height: 220px; width: 100%; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s; }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #2563EB 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%; max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { font-size: 42px; }
.login-logo h1 { font-size: 24px; font-weight: 800; color: var(--text-dark); margin-top: 8px; }
.login-logo p { font-size: 13px; color: var(--text-muted); }
.login-error {
    background: var(--urgent-bg);
    border: 1px solid var(--urgent);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--urgent);
    margin-bottom: 16px;
    display: flex; gap: 8px; align-items: center;
}

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.alert-success { background: var(--completed-bg); color: var(--completed); border: 1px solid #BBF7D0; }
.alert-error { background: var(--delayed-bg); color: var(--delayed); border: 1px solid #FECACA; }
.alert-warning { background: var(--normal-bg); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--high-bg); color: var(--high); border: 1px solid #BFDBFE; }

/* ---- TABS ---- */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
    padding: 10px 16px;
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none; background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--text-dark); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    display: none;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--text-dark); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ---- EMPTY STATE ---- */
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .3; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 16px 0; }
.page-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 12px; font-weight: 600;
    cursor: pointer; background: var(--bg-white); color: var(--text-muted);
    transition: all .15s;
}
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ---- UPLOAD ---- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-area .upload-icon { font-size: 36px; margin-bottom: 8px; color: var(--text-muted); }
.upload-area p { font-size: 13px; color: var(--text-muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 12px; }
.photo-thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- OVERLAY (mobile sidebar) ---- */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 90;
}
.sidebar-overlay.open { display: block; }

/* ---- UTILITIES ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--urgent); }
.text-success { color: var(--completed); }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.d-grid { display: grid; }
.col-2 { grid-template-columns: 1fr 1fr; gap: 16px; }

/* ==============================
   RESPONSIVE - MOBILE FIRST
   ============================== */

/* ==============================
   INLINE GRID YARDIMCI SINIFLARI
   ============================== */
.dash-main-grid { }
.two-col-grid { }

/* ==============================
   RESPONSIVE - MOBİL ÖNCE
   ============================== */

/* --- Tablet ve Telefon (≤ 768px) --- */
@media (max-width: 768px) {

    /* Sidebar slide-out */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 200;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }

    /* Ana içerik sidebar yanına değil, tam genişlik */
    .main-content { margin-left: 0 !important; width: 100%; }

    /* Hamburger göster */
    .hamburger-btn { display: flex; }

    /* İçerik padding azalt */
    .page-content { padding: 12px !important; max-width: 100% !important; }

    /* Taşmayı önle */
    body, .layout-wrapper { overflow-x: hidden; max-width: 100vw; }
    * { max-width: 100%; box-sizing: border-box; }

    /* Header */
    .site-header { padding: 0 12px; gap: 8px; }
    .header-title { font-size: 14px; }
    .header-actions { gap: 6px; }
    .btn-text { display: none; }  /* "Yeni İş" yazısını gizle */
    .header-btn { width: 34px; height: 34px; }

    /* Inline grid'leri tek kolona düşür */
    .dash-main-grid { grid-template-columns: 1fr !important; }
    .two-col-grid { grid-template-columns: 1fr !important; }

    /* KPI grid */
    .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .kpi-card { padding: 10px 12px; gap: 8px; }
    .kpi-icon { width: 32px; height: 32px; font-size: 15px; }
    .kpi-value { font-size: 20px; }
    .kpi-label { font-size: 11px; }

    /* CSS class'lı grid'ler */
    .form-row, .form-row-3, .col-2, .info-grid { grid-template-columns: 1fr !important; }
    .detail-grid { grid-template-columns: 1fr !important; }
    .report-grid { grid-template-columns: 1fr !important; }

    /* Page header */
    .page-header { margin-bottom: 16px; }
    .page-header h1 { font-size: 18px; }

    /* Tablo yatay kaydırma */
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Mobilde gizlenecek tablo kolonları */
    .col-hide-mobile { display: none !important; }

    /* Card */
    .card-header { flex-wrap: wrap; gap: 8px; }

    /* Filtre bar */
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .search-wrap { min-width: 0; width: 100%; }
    .filter-bar .filter-group { flex-wrap: wrap; }

    /* Job card */
    .job-card .job-actions { flex-wrap: wrap; }

    /* Bildirim dropdown */
    .notif-dropdown { width: calc(100vw - 20px); right: -40px; left: auto; }

    /* Login */
    .login-box { padding: 24px 16px; }
    .login-page { padding: 16px; }

    /* Modal - alt sheet gibi aç */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal {
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        position: fixed;
        bottom: 0;
        left: 0; right: 0;
        max-width: 100% !important;
        max-height: 90vh;
        width: 100%;
    }

    /* Takvim */
    .cal-body { min-height: 280px; }
    .cal-cell { min-height: 60px; font-size: 10px; }
    .cal-event { font-size: 9px; padding: 1px 3px; }
    .calendar-toolbar { gap: 6px; flex-wrap: wrap; }

    /* Toast konumu */
    .toast-container { right: 12px !important; bottom: 12px !important; max-width: calc(100vw - 24px) !important; }
}

/* --- Küçük Telefon (≤ 480px) --- */
@media (max-width: 480px) {
    .page-content { padding: 10px !important; }
    .site-header { padding: 0 10px; }
    .header-title { font-size: 13px; }
    .kpi-grid { gap: 6px; }
    .kpi-card { padding: 8px 10px; gap: 6px; }
    .kpi-icon { width: 28px; height: 28px; font-size: 13px; }
    .kpi-value { font-size: 18px; }
    .kpi-label { font-size: 10px; }
    .data-table th, .data-table td { padding: 8px 8px; font-size: 11px; }
    .page-header h1 { font-size: 16px; }
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
    .cal-cell { min-height: 46px; }
    .cal-cell-date { font-size: 10px; width: 18px; height: 18px; }
}

/* --- Tablet (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    :root { --sidebar-width: 220px; }
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-grid { grid-template-columns: 1fr 290px; }
    .page-content { padding: 16px; }
}

/* --- Landscape Telefon --- */
@media (max-width: 768px) and (orientation: landscape) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .cal-cell { min-height: 44px; }
}

/* --- Touch: hover efektlerini kaldır --- */
@media (hover: none) {
    .kpi-card:hover { transform: none; box-shadow: var(--shadow); }
    .job-card:hover { transform: none; border-color: var(--border); box-shadow: none; }
    .btn-start:hover { transform: none; }
}
