/* ═══════════════════════════════════════════════════════════════════════════
   Josephware — Design System
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    --color-bg: #F1F5F9;
    --color-surface: #ffffff;
    --color-text: #0F172A;
    --color-text-secondary: #64748B;
    --color-accent: #A78BFA;
    --color-accent-dark: #8B5CF6;
    --color-primary: #7DD3FC;
    --color-dark: #0F172A;
    --color-gold: #c9a34f;
    --color-success: #30d158;
    --color-warning: #ff9f0a;
    --color-danger: #ff375f;
    --color-info: #7DD3FC;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--color-bg); color: var(--color-text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1,h2,h3,h4,p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--color-accent); text-decoration: none; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; position: relative; }

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--color-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    overflow-y: auto;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    backdrop-filter: blur(2px);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 28px;
}
.logo-mark {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 20px; color: #0F172A;
    flex-shrink: 0;
}
.logo-title { display: block; font-weight: 700; font-size: 17px; }
.logo-subtitle { display: block; font-size: 10px; color: #6e6e73; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section-title { font-size: 10px; color: #475569; text-transform: uppercase; letter-spacing: 1.2px; padding: 16px 12px 6px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    background: none; border: none;
    color: #a1a1a6; padding: 10px 12px;
    border-radius: var(--radius-md); width: 100%;
    text-align: left; font-size: 14px; font-weight: 500;
    transition: var(--transition);
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.07); }
.nav-item-active { color: white !important; background: rgba(255,255,255,0.12) !important; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer { padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 12px; }
.user-profile { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--radius-md); transition: background 0.2s; cursor: default; }
.user-profile:hover { background: rgba(255,255,255,0.05); }
.user-avatar { width: 34px; height: 34px; background: var(--color-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; }
.user-role { display: block; font-size: 11px; color: #86868b; }

/* ─── MAIN CONTENT ───────────────────────────────────────────────────────── */
.main-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px;
    background: rgba(241,245,249,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15,23,42,0.07);
    position: sticky; top: 0; z-index: 50;
    min-height: var(--topbar-height);
    gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { flex-shrink: 0; }
.page-title { font-size: 24px; font-weight: 700; line-height: 1.2; }
.page-subtitle { color: var(--color-text-secondary); font-size: 12px; margin-top: 2px; }
.menu-toggle { display: none; background: white; border: none; font-size: 20px; padding: 8px 10px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); flex-shrink: 0; }

/* ─── PAGE SECTIONS ──────────────────────────────────────────────────────── */
.page-section { display: none; flex-direction: column; gap: 20px; padding: 24px 28px 40px; }
.page-section-active { display: flex; }

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.6px; }

/* ─── STATS GRID ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}
.stat-card-gold { border-top: 3px solid var(--color-gold); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1; color: var(--color-text); }
.stat-card-gold .stat-value { color: var(--color-gold); }

/* ─── DASHBOARD GRID ─────────────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Timeline */
.appointment-timeline { display: flex; flex-direction: column; gap: 0; max-height: 400px; overflow-y: auto; }
.timeline-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-bg); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item.timeline-completed { opacity: 0.5; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-time { font-size: 13px; font-weight: 700; }
.timeline-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-service { font-size: 12px; font-weight: 500; }
.timeline-status { flex-shrink: 0; }
.empty-state-sm { color: var(--color-text-secondary); font-size: 14px; padding: 20px 0; text-align: center; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--color-accent);
    color: white; border: none;
    padding: 11px 20px;
    border-radius: 25px;
    font-size: 14px; font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(167,139,250,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 20px; }

.btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid rgba(0,0,0,0.1); padding: 11px 20px; border-radius: 25px; font-size: 14px; font-weight: 500; transition: var(--transition); }
.btn-secondary:hover { background: #e8e8ed; }

.btn-danger { background: var(--color-danger); color: white; border: none; padding: 11px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; transition: var(--transition); }
.btn-danger:hover { background: #e0314f; }

.btn-ghost { background: none; border: none; color: var(--color-text); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; transition: var(--transition); }
.btn-ghost:hover { background: rgba(0,0,0,0.06); }
.btn-icon-round { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 20px; }

.btn-icon { background: none; border: 1px solid transparent; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 14px; transition: var(--transition); color: var(--color-text-secondary); }
.btn-icon:hover { background: var(--color-bg); border-color: rgba(0,0,0,0.08); color: var(--color-text); }
.btn-icon-danger:hover { background: #fff0f3; color: var(--color-danger); border-color: var(--color-danger); }

.w-full { width: 100%; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(48,209,88,0.15); color: #218e3b; }
.badge-danger { background: rgba(255,55,95,0.12); color: #c0133f; }
.badge-info { background: rgba(125,211,252,0.18); color: #0284C7; }
.badge-warning { background: rgba(255,159,10,0.15); color: #a05800; }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-hidden { display: none !important; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
label { font-size: 13px; font-weight: 600; color: #3c3c43; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
    padding: 11px 14px;
    border: 1.5px solid #d1d1d6;
    border-radius: var(--radius-md);
    font-size: 14px;
    background: #fafafa;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(167,139,250,0.2);
    background: white;
}
input[readonly] { background: #f2f2f7; color: var(--color-text-secondary); }
input[type="color"].color-input { padding: 4px; height: 44px; cursor: pointer; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.date-filter-input { padding: 7px 10px; font-size: 13px; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.search-box input { padding-left: 36px; }

/* ─── TABLES ─────────────────────────────────────────────────────────────── */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 10px 14px; border-bottom: 2px solid var(--color-bg); color: var(--color-text-secondary); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--color-bg); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }
.row-warning td { background: #fff8f0 !important; }
.empty-td { text-align: center; padding: 32px !important; color: var(--color-text-secondary); }
.action-cell { white-space: nowrap; }

.customer-name-cell { display: flex; align-items: center; gap: 10px; }
.customer-avatar-sm { width: 30px; height: 30px; background: var(--color-accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }

/* ─── SECTION TOOLBARS ───────────────────────────────────────────────────── */
.section-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-2col { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }

/* ─── SALES TOTAL ────────────────────────────────────────────────────────── */
.sales-total { padding: 12px 14px 0; }
.sales-total-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 2px solid var(--color-bg); font-size: 14px; }

/* ─── STOCK ──────────────────────────────────────────────────────────────── */
.stock-qty { font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.stock-ok { background: rgba(48,209,88,0.12); color: #218e3b; }
.stock-low { background: rgba(255,55,95,0.12); color: var(--color-danger); }

/* ─── CALENDAR ───────────────────────────────────────────────────────────── */
.calendar-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.calendar-week-label { font-size: 15px; font-weight: 600; min-width: 200px; text-align: center; }
.view-toggle { display: flex; background: var(--color-bg); border-radius: 10px; padding: 3px; gap: 2px; margin-left: auto; }
.view-btn { background: none; border: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--color-text-secondary); transition: var(--transition); }
.view-btn-active { background: white; color: var(--color-text); box-shadow: var(--shadow-sm); }

.calendar-container { padding: 0; overflow: hidden; }

.cal-week { display: flex; flex-direction: column; height: 100%; }
.cal-header-row {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    border-bottom: 1.5px solid var(--color-bg);
    background: #fafafa;
    /* position ve top değerleri silindi, beyaz boşluk sorunu çözüldü */
    z-index: 10;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.cal-time-gutter { position: relative; }
.cal-day-header { padding: 10px 6px; text-align: center; border-left: 1px solid var(--color-bg); }
.cal-day-name { display: block; font-size: 11px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-day-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: 16px; font-weight: 600; margin-top: 2px; }
.cal-today-header { background: rgba(167,139,250,0.05); }
.cal-today-num { background: var(--color-accent); color: white; }

.cal-body-scroll { overflow-y: auto; flex: 1; max-height: calc(100vh - 280px); }
.cal-body {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    position: relative;
}
.cal-time-gutter { position: relative; }
.cal-hour-label { position: absolute; right: 8px; font-size: 11px; color: var(--color-text-secondary); transform: translateY(-50%); white-space: nowrap; }

.cal-day-col {
    border-left: 1px solid rgba(0,0,0,0.06);
    position: relative;
    min-height: 100%;
}
.cal-today-col { background: rgba(167,139,250,0.03); }
.cal-hour-line {
    position: absolute; left: 0; right: 0;
    height: 70px;
    border-top: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background 0.15s;
}
.cal-hour-line:hover { background: rgba(167,139,250,0.06); }
/* 1. Kutu Uzama Çözümü ve Okunabilirlik */
.cal-appointment {
    position: absolute;
    left: 3px; right: 3px;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    border-left: 3px solid transparent;
    overflow: hidden;
    transition: box-shadow 0.15s, height 0.15s ease-out, z-index 0s;
    z-index: 5;
}

.cal-appointment:hover {
    height: auto !important; 
    min-height: 0 !important; /* Sonsuza uzamayı tamamen iptal eder */
    bottom: auto !important;
    z-index: 50; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    background-color: #ffffff !important; 
    border: 1px solid rgba(0,0,0,0.08);
}

.cal-app-time { display: block; font-size: 10px; font-weight: 700; opacity: 0.8; margin-bottom: 2px; }
.cal-app-name { display: block; font-size: 12px; font-weight: 600; white-space: normal; line-height: 1.2; margin-bottom: 3px; }
.cal-app-service { display: block; font-size: 11px; opacity: 0.85; white-space: normal; line-height: 1.2; }

/* 2. Hover Detay Paneli (Sadece üzerine gelince açılır) */
.cal-hover-details {
    display: none; /* Normalde gizli */
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
}
.cal-appointment:hover .cal-hover-details {
    display: flex; /* Hover olunca görünür */
}
.cal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cal-app-completed { opacity: 0.6; }
.cal-app-cancelled { opacity: 0.4; text-decoration: line-through; }

/* List view */
.list-view { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.list-date-group { background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(0,0,0,0.06); }
.list-date-header { padding: 10px 14px; background: var(--color-bg); font-size: 13px; font-weight: 700; }
.list-appointment-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--color-bg); cursor: pointer; transition: background 0.15s; }
.list-appointment-row:last-child { border-bottom: none; }
.list-appointment-row:hover { background: #fafafa; }
.list-time { font-size: 13px; font-weight: 700; min-width: 100px; }
.list-customer { font-size: 14px; font-weight: 600; flex: 1; }
.list-service { font-size: 13px; min-width: 100px; }
.list-status { flex-shrink: 0; }

/* ─── REPORTS ────────────────────────────────────────────────────────────── */
.report-toolbar { display: flex; gap: 8px; background: var(--color-surface); padding: 6px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); width: fit-content; }
.report-period-btn { border-radius: var(--radius-md); padding: 8px 16px; font-weight: 600; font-size: 13px; }
.report-period-btn.active { background: var(--color-accent); color: white; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-card-wide { grid-column: 1 / -1; }

/* ─── PROMOTIONS ─────────────────────────────────────────────────────────── */
.promotions-list { display: flex; flex-direction: column; gap: 12px; }
.promo-card { border-radius: var(--radius-md); padding: 14px; border: 1.5px solid rgba(0,0,0,0.08); background: #fafafa; }
.promo-active { border-color: var(--color-success); background: rgba(48,209,88,0.04); }
.promo-expired { opacity: 0.6; }
.promo-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.promo-name { display: block; font-size: 15px; font-weight: 700; }
.promo-discount { display: inline-block; margin-top: 2px; padding: 2px 8px; background: var(--color-accent); color: white; border-radius: 10px; font-size: 12px; font-weight: 700; }
.promo-actions { display: flex; align-items: center; gap: 6px; }
.promo-dates { font-size: 12px; color: var(--color-text-secondary); margin-top: 6px; }
.promo-desc { font-size: 13px; margin-top: 6px; color: var(--color-text-secondary); }

/* ─── SETTINGS ───────────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.settings-info { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-bg); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.settings-actions { display: flex; flex-direction: column; gap: 8px; }
.color-dot { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.1); vertical-align: middle; }

/* ─── CUSTOMER PROFILE ───────────────────────────────────────────────────── */
.profile-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.profile-avatar { width: 64px; height: 64px; background: var(--color-accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.profile-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.profile-info p { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.profile-stat { background: var(--color-bg); border-radius: var(--radius-md); padding: 12px; text-align: center; }
.profile-notes { background: #fffbf0; border: 1px solid #f0e0a0; border-radius: var(--radius-md); padding: 12px; font-size: 13px; margin-bottom: 16px; }
.profile-history h4 { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; gap: 0; max-height: 260px; overflow-y: auto; }
.history-item { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-bg); font-size: 13px; }
.history-date { font-weight: 700; white-space: nowrap; }
.history-time { color: var(--color-text-secondary); }
.history-service { font-weight: 600; }
.modal-footer { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--color-bg); margin-top: 16px; }

/* ─── MODALS ─────────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 1000;
    align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
}
.modal.modal-open { display: flex; }
.modal-dialog {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
    margin: auto;
}
.modal-dialog-lg { max-width: 700px; }
@keyframes modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--color-bg); position: sticky; top: 0; background: white; z-index: 1; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: var(--color-bg); border: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--color-text-secondary); transition: var(--transition); }
.modal-close:hover { background: rgba(255,55,95,0.12); color: var(--color-danger); }
.modal-body { padding: 22px; }
body.has-modal { overflow: hidden; }

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
    background: #1d1d1f;
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(10px) scale(0.96);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: all;
    max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { background: #1c3d27; border-left: 3px solid var(--color-success); }
.toast-error { background: #3d1c23; border-left: 3px solid var(--color-danger); }
.toast-warning { background: #3d2e1c; border-left: 3px solid var(--color-warning); }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { color: var(--color-text-secondary); font-size: 15px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .section-2col { grid-template-columns: 1fr; }
    .charts-grid { grid-template-columns: 1fr; }
    .chart-card-wide { grid-column: 1; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .cal-body, .cal-header-row { grid-template-columns: 56px repeat(7, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .sidebar {
        position: fixed;
        top: 0; left: 0; height: 100%;
        transform: translateX(-100%);
    }
    .body.sidebar-open .sidebar,
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; }

    .page-section { padding: 16px 16px 40px; gap: 14px; }
    .topbar { padding: 12px 16px; }
    .page-title { font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-value { font-size: 24px; }

    .cal-header-row, .cal-body { grid-template-columns: 40px repeat(7, 1fr); }
   /* Mobilde saatleri göster ama sığması için küçült */
    .cal-hour-label { 
        display: block !important; 
        font-size: 9px; 
        right: 4px; 
    }
    .cal-app-service { display: none; }
    .cal-app-time { font-size: 9px; }
    .cal-app-name { font-size: 10px; }
    .calendar-week-label { font-size: 13px; min-width: 150px; }

    .profile-stats { grid-template-columns: 1fr 1fr; }
    .history-item { grid-template-columns: auto 1fr; }
    .history-time, .history-service { display: none; }

    #toast-container { bottom: 16px; right: 16px; left: 16px; }
    .toast { max-width: 100%; }

    /* WhatsApp butonunun mobilde kaybolmasını engeller ve listeyi düzenler */
    .list-appointment-row {
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto auto;
        gap: 6px 10px;
        align-items: center;
        padding: 14px;
    }
    .list-time { grid-column: 1 / -1; font-size: 11px; color: var(--color-text-secondary); margin-bottom: -4px; }
    .list-customer { grid-column: 1; grid-row: 2; font-size: 14px; white-space: normal; }
    .list-service { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--color-accent); }
    .list-price { display: none; } /* Mobilde yer kazanmak için fiyatı gizleriz */
    .list-status { grid-column: 2; grid-row: 2; transform: scale(0.9); transform-origin: right; }
    .btn-whatsapp { grid-column: 3; grid-row: 2; margin: 0; width: 32px; height: 32px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .section-toolbar { flex-direction: column; align-items: stretch; }
    .modal-dialog { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: fixed; bottom: 0; left: 0; right: 0; margin: 0; max-height: 90vh; border-radius: 20px 20px 0 0; }
    .modal { align-items: flex-end; padding: 0; }
}

/* ─── PACKAGES ───────────────────────────────────────────────────────────── */
.packages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pkg-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: 18px; border: 1.5px solid rgba(0,0,0,0.07); box-shadow: var(--shadow-sm); }
.pkg-active { border-top: 3px solid var(--color-accent); }
.pkg-completed { opacity: 0.7; border-top: 3px solid var(--color-success); }
.pkg-cancelled { opacity: 0.5; }
.pkg-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.pkg-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pkg-customer-name { font-size: 16px; font-weight: 700; }
.pkg-service-name { font-size: 13px; color: var(--color-accent); font-weight: 600; margin-top: 2px; }
.pkg-date { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; }
.pkg-stats { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; margin-bottom: 14px; background: var(--color-bg); border-radius: var(--radius-md); padding: 12px; }
.pkg-stat-block { text-align: center; }
.pkg-stat-label { font-size: 10px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.pkg-stat-value { font-size: 22px; font-weight: 800; margin: 4px 0; }
.pkg-total { font-size: 14px; font-weight: 400; color: var(--color-text-secondary); }
.pkg-stat-sub { font-size: 12px; font-weight: 500; }
.pkg-stat-divider { width: 1px; background: rgba(0,0,0,0.1); margin: 0 10px; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.pkg-progress-row { margin-bottom: 8px; }
.pkg-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-text-secondary); margin-bottom: 4px; }
.progress-bar { height: 6px; background: rgba(0,0,0,0.08); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.progress-fill-purple { background: var(--color-accent); }
.progress-fill-gold { background: var(--color-gold); }
.pkg-notes { font-size: 12px; color: var(--color-text-secondary); margin: 10px 0; padding: 8px; background: var(--color-bg); border-radius: var(--radius-sm); }
.pkg-action-buttons { display: flex; gap: 8px; margin-top: 12px; }
.pkg-action-buttons .btn-primary, .pkg-action-buttons .btn-secondary { flex: 1; }
.filter-select { padding: 9px 12px; border: 1.5px solid #d1d1d6; border-radius: var(--radius-md); font-size: 14px; background: white; }

/* ─── CASHBOOK / KASA ────────────────────────────────────────────────────── */

/* ─── KASA HERO (Global Bakiye) ──────────────────────────────────────────── */
.kasa-hero-card {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.35);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.kasa-hero-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.9;
}
.kasa-hero-value {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.kasa-hero-meta {
    display: flex;
    gap: 24px;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}
.kasa-hero-meta strong { font-weight: 700; color: #fff; }
@media (max-width: 600px) {
    .kasa-hero-value { font-size: 32px; }
    .kasa-hero-meta { flex-direction: column; gap: 4px; }
}

.kasa-toolbar { display: flex; align-items: center; gap: 12px; }
.cash-date-label { font-size: 16px; font-weight: 700; color: var(--color-accent); }
.kasa-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kasa-card { border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,0.04); }
.kasa-income { background: rgba(48,209,88,0.08); border-top: 3px solid var(--color-success); }
.kasa-expense { background: rgba(255,55,95,0.07); border-top: 3px solid var(--color-danger); }
.kasa-net { background: var(--color-surface); border-top: 3px solid var(--color-accent); }
.kasa-card-label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.kasa-card-value { font-size: 28px; font-weight: 800; }
.kasa-income .kasa-card-value { color: var(--color-success); }
.kasa-expense .kasa-card-value { color: var(--color-danger); }
.kasa-payment-breakdown { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--color-text-secondary); flex-wrap: wrap; }
.row-income td { background: rgba(48,209,88,0.03) !important; }
.row-expense td { background: rgba(255,55,95,0.03) !important; }
.cash-type-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }

/* ─── CONTRACTS ──────────────────────────────────────────────────────────── */
.contract-document { font-size: 14px; line-height: 1.7; }
.contract-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--color-text); margin-bottom: 20px; }
.contract-logo strong { font-size: 18px; display: block; }
.contract-logo div { font-size: 13px; color: var(--color-text-secondary); }
.contract-section { margin-bottom: 20px; }
.contract-section h4 { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-text-secondary); border-bottom: 1px solid #e0e0e0; padding-bottom: 6px; margin-bottom: 10px; }
.contract-table { width: 100%; border-collapse: collapse; }
.contract-table td { padding: 8px 12px; border: 1px solid #e8e8e8; }
.contract-table td:first-child { font-weight: 600; width: 160px; background: #fafafa; }
.contract-terms { padding-left: 18px; }
.contract-terms li { margin-bottom: 6px; }
.contract-notes { background: #fffbf0; border: 1px solid #f0e0a0; border-radius: var(--radius-sm); padding: 10px 12px; border-left: 3px solid var(--color-gold); }
.contract-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.signature-block { text-align: center; font-size: 13px; }
.signature-line { border-top: 1.5px solid var(--color-text); margin-bottom: 8px; margin-top: 50px; }
.signature-name { font-weight: 600; margin-top: 4px; }

/* ─── WHATSAPP ────────────────────────────────────────────────────────────── */
.btn-whatsapp { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #25d366; color: white; font-size: 14px; text-decoration: none; transition: transform 0.15s; flex-shrink: 0; }
.btn-whatsapp:hover { transform: scale(1.1); }
.btn-whatsapp-sm { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #25d366; font-size: 12px; text-decoration: none; flex-shrink: 0; }
.messages-list { display: flex; flex-direction: column; gap: 10px; }
.msg-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--color-bg); border-radius: var(--radius-md); }
.msg-item-info { display: flex; flex-direction: column; gap: 2px; }
.msg-item-info strong { font-size: 15px; }
.msg-item-info span { font-size: 12px; color: var(--color-text-secondary); }
.msg-item-action { flex-shrink: 0; }

/* ─── TIMELINE UPDATES ───────────────────────────────────────────────────── */
.timeline-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.timeline-price { font-size: 11px; background: rgba(201,163,79,0.15); color: var(--color-gold); padding: 2px 6px; border-radius: 8px; font-weight: 700; margin-left: 4px; }

/* ─── PROFILE SECTIONS ───────────────────────────────────────────────────── */
.profile-section { margin-top: 20px; }
.profile-section-title { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--color-bg); }
.profile-packages { display: flex; flex-direction: column; gap: 12px; }
.loading-state { text-align: center; padding: 30px; color: var(--color-text-secondary); }

/* ─── CALENDAR COUNT DOT ─────────────────────────────────────────────────── */
.cal-day-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 10px; background: var(--color-accent); color: white; font-size: 10px; font-weight: 700; padding: 0 4px; margin-top: 2px; }

/* ─── HISTORY UPDATES ────────────────────────────────────────────────────── */
.history-item { display: grid; grid-template-columns: 80px 60px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-bg); font-size: 13px; }

/* ─── SAFE AREA (iOS) ────────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content { padding-bottom: env(safe-area-inset-bottom); }
    #toast-container { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ─── AUTH — USER PROFILE BUTTON ────────────────────────────────────────── */
button.user-profile {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    padding: 8px;
}
button.user-profile:hover { background: rgba(255,255,255,0.07); }

.role-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 6px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.role-badge-admin    { background: rgba(167,139,250,0.25); color: #DDD6FE; }
.role-badge-employee { background: rgba(255,255,255,0.08); color: #94A3B8; }

/* ─── AUTH — LOGIN MODAL ─────────────────────────────────────────────────── */
.modal-dialog-sm { max-width: 380px; }
.modal-dialog-md { max-width: 560px; }

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-top: 8px;
}
.login-logo-mark {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 900;
    color: #0F172A;
}
.login-logo-text { font-size: 15px; font-weight: 700; color: var(--color-text-secondary); }

.password-input-wrapper { position: relative; }
.password-input-wrapper input { padding-right: 48px; }
.pw-toggle {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    font-size: 18px; cursor: pointer; padding: 4px;
    line-height: 1;
}

.login-error {
    display: none;
    background: rgba(255,55,95,0.1);
    border: 1px solid rgba(255,55,95,0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-danger);
    align-items: center;
    gap: 6px;
}
.login-error.show { display: flex; }

.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 30px; }

.login-hint {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 16px;
    line-height: 1.6;
}

/* ─── AUTH — ADMIN PANEL ─────────────────────────────────────────────────── */
.admin-panel-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(167,139,250,0.15);
    color: var(--color-accent);
}

.admin-section { margin-bottom: 4px; }
.admin-section-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.admin-section-icon { font-size: 24px; flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--color-bg); border-radius: 10px; }
.admin-section-title { font-size: 15px; font-weight: 700; }
.admin-section-subtitle { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.admin-section-footer { margin-top: 14px; }
.admin-divider { border: none; border-top: 1.5px solid var(--color-bg); margin: 20px 0; }

/* Permission list */
.perm-list { display: flex; flex-direction: column; gap: 2px; }
.perm-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}
.perm-row:hover { background: var(--color-bg); }
.perm-row-locked { opacity: 0.6; }
.perm-info { display: flex; align-items: center; gap: 10px; }
.perm-icon { font-size: 16px; width: 22px; text-align: center; }
.perm-label { font-size: 14px; font-weight: 500; }
.perm-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; padding: 2px 7px; background: var(--color-bg); border-radius: 10px; color: var(--color-text-secondary); margin-left: 4px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #ccc; border-radius: 24px;
    transition: 0.25s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-disabled { opacity: 0.5; pointer-events: none; }

/* Logout button */
.btn-logout {
    background: rgba(255,55,95,0.08);
    color: var(--color-danger);
    border: 1.5px solid rgba(255,55,95,0.2);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-logout:hover { background: rgba(255,55,95,0.15); border-color: var(--color-danger); }

/* ─── ACTIVITY LOG ──────────────────────────────────────────────────────── */
.activity-log-card { display: flex; flex-direction: column; }
.card-subtitle { color: var(--color-text-secondary); font-size: 12px; margin-top: 2px; display: block; }
.activity-log-card .card-subtitle { color: var(--color-text-secondary); font-size: 12px; margin-top: 2px; }

/* Toolbar */
.activity-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.filter-select {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    min-width: 180px;
}
.filter-date {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
}
.activity-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-text-secondary);
    padding: 0 4px;
}

/* Log list */
.activity-log-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    max-height: calc(100vh - 260px);
}

/* Date group */
.activity-group { margin-bottom: 8px; }
.activity-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 6px;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 1;
}
.activity-date-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.activity-date-count {
    font-size: 11px;
    color: var(--color-text-secondary);
    background: var(--color-bg-elevated);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Individual items */
.activity-items { display: flex; flex-direction: column; }
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--color-bg-elevated); }

.activity-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.activity-item-body { flex: 1; min-width: 0; }
.activity-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.activity-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}
.activity-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(48,209,88,0.1);
    padding: 1px 8px;
    border-radius: 8px;
}
.activity-item-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-item-time {
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Empty state */
.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
    text-align: center;
    gap: 8px;
}
.activity-empty-icon { font-size: 40px; opacity: 0.5; }
.activity-empty p { font-size: 15px; font-weight: 500; margin: 0; }
.activity-empty small { font-size: 12px; opacity: 0.7; }

/* Kasa auto-created badge */
.badge-auto {
    font-size: 10px;
    background: rgba(10,132,255,0.12);
    color: #0a84ff;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* Satış tablosu ürün badge */
.badge-product {
    font-size: 10px;
    background: rgba(255,159,10,0.2);
    color: #e68600;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 4px;
    font-weight: 600;
}

/* Prim bölümü */
.prim-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 8px;
}
.prim-sep { color: var(--color-text-secondary); font-size: 14px; }
.prim-table .action-cell { white-space: nowrap; }

/* ─── SCROLLBARS ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
/* ═══════════════════════════════════════════════════════════════════════════
   TAKVİM GÜNCELLEMELERİ (KESİK METİN ÇÖZÜMÜ VE AY/GÜN GÖRÜNÜMÜ)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Kesik Metinleri Düzeltme & Hover ile Genişleme Animasyonu */
.cal-appointment {
    overflow: hidden;
    transition: box-shadow 0.15s, height 0.15s ease-out, z-index 0s;
}
.cal-appointment:hover {
    height: auto !important; /* Kutunun yüksekliğini içeriğe göre uzat */
    min-height: 100%;
    z-index: 50; /* Üstte görünsün */
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-bottom: 2px solid rgba(0,0,0,0.1);
}
.cal-app-name {
    white-space: normal; /* Metnin kesilmesini engeller, alt satıra atar */
    line-height: 1.2; 
    margin-bottom: 3px;
}
.cal-app-service {
    white-space: normal; /* Metnin kesilmesini engeller */
    line-height: 1.2;
}

/* 2. Aylık Görünüm (Modern Grid Yapısı) */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid var(--color-bg);
    border-left: 1px solid var(--color-bg);
    background: #fafafa;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.cal-month-header {
    padding: 12px 10px; text-align: center;
    font-size: 11px; font-weight: 700; color: var(--color-text-secondary);
    text-transform: uppercase; border-right: 1px solid var(--color-bg); border-bottom: 1px solid var(--color-bg);
}
.cal-month-cell {
    min-height: 110px; padding: 6px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-bg); border-bottom: 1px solid var(--color-bg);
    display: flex; flex-direction: column; gap: 4px;
    cursor: pointer; transition: background 0.2s;
}
.cal-month-cell:hover { background: #fdfdfd; }
.cal-month-cell-empty { background: #fafafa; pointer-events: none; }
.cal-month-date {
    font-size: 13px; font-weight: 600; align-self: flex-end;
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
    margin-bottom: 4px; color: var(--color-text-secondary);
}
.cal-month-today .cal-month-date { background: var(--color-accent); color: white; }

.cal-month-app {
    font-size: 10px; font-weight: 600; padding: 4px 6px;
    border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: white; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 3. Günlük Görünüm (Sadece 1 Kolonluk Özel Ayar) */
.cal-day-view .cal-header-row { grid-template-columns: 56px 1fr; }
.cal-day-view .cal-body { grid-template-columns: 56px 1fr; }

/* ═══════════════════════════════════════════════════════════════════════════
   ABONELİK SÜRESİ DOLDU EKRANI
   ═══════════════════════════════════════════════════════════════════════════ */

#subscription-expired-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: sub-fade-in 0.35s ease;
}
@keyframes sub-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sub-expired-card {
    background: #1E293B;
    border-radius: var(--radius-lg);
    padding: 52px 44px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(167,139,250,0.2);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(125,211,252,0.05);
    animation: modal-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.sub-expired-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(125,211,252,0.15), rgba(167,139,250,0.2));
    border: 1.5px solid rgba(167,139,250,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin: 0 auto 24px;
}

.sub-expired-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(125,211,252,0.1);
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 16px;
}

.sub-expired-title {
    font-size: 22px;
    font-weight: 800;
    color: #F8FAFC;
    margin: 0 0 14px;
    line-height: 1.3;
}

.sub-expired-msg {
    font-size: 14px;
    color: #94A3B8;
    line-height: 1.75;
    margin: 0 0 32px;
}
.sub-expired-msg strong { color: var(--color-accent); font-weight: 700; }

.sub-expired-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0 0 28px;
}

.btn-sub-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,55,95,0.1);
    color: var(--color-danger);
    border: 1.5px solid rgba(255,55,95,0.25);
    padding: 13px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-sub-logout:hover {
    background: rgba(255,55,95,0.2);
    border-color: var(--color-danger);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .sub-expired-card { padding: 36px 24px; }
    .sub-expired-title { font-size: 19px; }
}