/* ============================================================
   VoIP Müşteri Paneli - Ana Stil Dosyası
   panel.0850numaraalma.cfd
   ============================================================ */

/* ---------- CSS Değişkenleri ---------- */
:root {
    --primary:        #e63946;
    --primary-dark:   #c1121f;
    --primary-light:  #ff6b6b;
    --accent:         #06d6a0;
    --accent-dark:    #05b386;
    --warning:        #ffd166;
    --info:           #118ab2;
    --sidebar-w:      260px;
    --topbar-h:       64px;
    --radius:         10px;
    --radius-lg:      16px;
    --transition:     0.25s ease;
    --font:           'Inter', system-ui, sans-serif;
}

/* KOYU MOD (varsayılan) */
[data-theme="dark"] {
    --bg:             #0f1117;
    --bg-2:           #181c27;
    --bg-3:           #1f2435;
    --bg-card:        #1a1f2e;
    --bg-hover:       #252b3b;
    --border:         #2a3045;
    --text:           #e2e8f0;
    --text-muted:     #8892a4;
    --text-dim:       #5a6478;
    --sidebar-bg:     #12161f;
    --topbar-bg:      #12161f;
    --shadow:         0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
}

/* AÇIK MOD */
[data-theme="light"] {
    --bg:             #f0f2f7;
    --bg-2:           #ffffff;
    --bg-3:           #f8f9fc;
    --bg-card:        #ffffff;
    --bg-hover:       #f1f3f9;
    --border:         #e2e6ef;
    --text:           #1a202c;
    --text-muted:     #64748b;
    --text-dim:       #94a3b8;
    --sidebar-bg:     #1a1f2e;
    --topbar-bg:      #ffffff;
    --shadow:         0 4px 24px rgba(0,0,0,0.08);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ---------- Layout ---------- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ---------- Sidebar ---------- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    min-height: var(--topbar-h);
}
.sidebar-logo .logo-img {
    height: 38px;
    object-fit: contain;
}
.sidebar-close {
    color: var(--text-muted);
    font-size: 18px;
    display: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--transition);
}
.sidebar-close:hover { color: var(--primary); background: var(--bg-hover); }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(230,57,70,0.06);
}
.user-avatar { font-size: 28px; color: var(--primary); flex-shrink: 0; }
.user-info { overflow: hidden; }
.user-name { display: block; font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.nav-section { margin-bottom: 4px; }
.nav-section-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 12px 16px 6px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 0;
    transition: all var(--transition);
    position: relative;
}
.nav-item:hover { color: var(--text); background: var(--bg-hover); }
.nav-item.active {
    color: var(--primary);
    background: rgba(230,57,70,0.1);
    border-right: 3px solid var(--primary);
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item-logout { color: var(--primary) !important; }
.nav-item-logout:hover { background: rgba(230,57,70,0.1); }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger-btn {
    display: none;
    color: var(--text-muted);
    font-size: 20px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all var(--transition);
}
.hamburger-btn:hover { color: var(--text); background: var(--bg-hover); }
.topbar-breadcrumb { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 18px;
    transition: all var(--transition);
}
.topbar-icon:hover { color: var(--accent); background: var(--bg-hover); }
.topbar-icon .fa-whatsapp { color: #25d366; }
.topbar-theme {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition);
}
.topbar-theme:hover { color: var(--warning); background: var(--bg-hover); }
.topbar-buy {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600;
}
.topbar-user-menu {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}
.topbar-user-menu:hover { background: var(--bg-hover); }
.topbar-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
}
.topbar-username { font-size: 13px; font-weight: 600; color: var(--text); }
.topbar-chevron { font-size: 11px; color: var(--text-muted); transition: transform var(--transition); }
.topbar-user-menu.open .topbar-chevron { transform: rotate(180deg); }
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    z-index: 200;
    overflow: hidden;
}
.user-dropdown.show { display: block; animation: fadeIn 0.15s ease; }
.user-dropdown a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-muted);
    transition: all var(--transition);
}
.user-dropdown a:hover { color: var(--text); background: var(--bg-hover); }
.user-dropdown a i { width: 16px; text-align: center; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.logout-link { color: var(--primary) !important; }

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

/* ---------- Flash Mesaj ---------- */
.flash-message {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    margin: 12px 24px 0;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
.flash-success { background: rgba(6,214,160,0.12); border: 1px solid rgba(6,214,160,0.3); color: var(--accent); }
.flash-error   { background: rgba(230,57,70,0.12); border: 1px solid rgba(230,57,70,0.3); color: var(--primary); }
.flash-info    { background: rgba(17,138,178,0.12); border: 1px solid rgba(17,138,178,0.3); color: var(--info); }
.flash-warning { background: rgba(255,209,102,0.12); border: 1px solid rgba(255,209,102,0.3); color: var(--warning); }
.flash-close { margin-left: auto; color: inherit; opacity: 0.6; font-size: 14px; }
.flash-close:hover { opacity: 1; }

/* ---------- Kartlar ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 15px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--primary); }
.card-body { padding: 20px; }

/* ---------- Stat Kartları ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.red    { background: rgba(230,57,70,0.15); color: var(--primary); }
.stat-icon.green  { background: rgba(6,214,160,0.15); color: var(--accent); }
.stat-icon.blue   { background: rgba(17,138,178,0.15); color: var(--info); }
.stat-icon.yellow { background: rgba(255,209,102,0.15); color: var(--warning); }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Uyarı Banner ---------- */
.alert-banner {
    background: linear-gradient(135deg, rgba(230,57,70,0.12), rgba(193,18,31,0.08));
    border: 1px solid rgba(230,57,70,0.3);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
}
.alert-banner i { color: var(--primary); font-size: 22px; flex-shrink: 0; }
.alert-banner-content { flex: 1; }
.alert-banner-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.alert-banner-text { font-size: 13px; color: var(--text-muted); }
.alert-banner .btn { flex-shrink: 0; }

.alert-info-banner {
    background: rgba(17,138,178,0.08);
    border: 1px solid rgba(17,138,178,0.25);
    border-left: 4px solid var(--info);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
    font-size: 13px; color: var(--text-muted);
}
.alert-info-banner i { color: var(--info); font-size: 18px; flex-shrink: 0; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 13.5px; font-weight: 600;
    transition: all var(--transition);
    cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230,57,70,0.35); }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(230,57,70,0.06); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.35); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Formlar ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-muted); margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    transition: all var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,57,70,0.12); }
.form-control::placeholder { color: var(--text-dim); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--primary); margin-top: 4px; }

/* ---------- Tablolar ---------- */
.table-wrapper { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-3);
    white-space: nowrap;
}
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-hover); }
.table-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.table-empty i { font-size: 40px; display: block; margin-bottom: 12px; opacity: 0.4; }
.table-empty p { font-size: 14px; }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px; font-weight: 700;
    white-space: nowrap;
}
.badge-success { background: rgba(6,214,160,0.15); color: var(--accent); }
.badge-danger   { background: rgba(230,57,70,0.15); color: var(--primary); }
.badge-warning  { background: rgba(255,209,102,0.15); color: #d4a017; }
.badge-info     { background: rgba(17,138,178,0.15); color: var(--info); }
.badge-secondary{ background: var(--bg-hover); color: var(--text-muted); }

/* ---------- Paket Kartları ---------- */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.package-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; flex-direction: column;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.package-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.package-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}
.popular-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 12px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    white-space: nowrap;
}
/* Card'ın üstünde badge varsa içerik için boşluk bırak */
.package-card.popular { padding-top: 38px; }
.package-icon { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.package-name { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.package-price { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.package-price span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.package-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.package-features { list-style: none; margin-bottom: 20px; flex: 1; }
.package-features li {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted);
    padding: 4px 0;
}
.package-features li i { color: var(--accent); font-size: 12px; }

/* ---------- Numara Sorgulama ---------- */
.number-query-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.number-query-box h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.number-query-box p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.number-input-group {
    display: flex; gap: 10px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 6px 6px 14px;
    transition: border-color var(--transition);
}
.number-input-group:focus-within { border-color: var(--primary); }
.number-input-group input {
    flex: 1; border: none; background: transparent;
    font-size: 18px; font-weight: 600; color: var(--text);
    outline: none; letter-spacing: 2px;
}
.number-input-group input::placeholder { font-size: 14px; letter-spacing: 0; font-weight: 400; }
.query-result {
    margin-top: 24px;
    text-align: left;
    animation: fadeIn 0.4s ease;
}
.query-available {
    background: rgba(6,214,160,0.08);
    border: 1px solid rgba(6,214,160,0.3);
    border-radius: var(--radius);
    padding: 16px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.query-available i { color: var(--accent); font-size: 22px; }
.query-available-text strong { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.query-available-text span { font-size: 13px; color: var(--text-muted); }

/* ---------- SIP Bilgileri ---------- */
.sip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.sip-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
}
.sip-item-icon { color: var(--primary); font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.sip-item-info { flex: 1; min-width: 0; }
.sip-item-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }
.sip-item-value { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 2px; font-family: monospace; }
.sip-copy-btn { color: var(--text-muted); font-size: 14px; padding: 4px 6px; border-radius: 6px; transition: all var(--transition); }
.sip-copy-btn:hover { color: var(--primary); background: var(--bg-hover); }

/* ---------- Ticket ---------- */
.ticket-priority-urgent { color: var(--primary); }
.ticket-priority-high   { color: var(--warning); }
.ticket-priority-medium { color: var(--info); }
.ticket-priority-low    { color: var(--text-muted); }

/* ---------- Sayfa Başlığı ---------- */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap; gap: 12px;
}
.page-header-title { font-size: 22px; font-weight: 800; color: var(--text); }
.page-header-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Boş Durum ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state-icon {
    font-size: 56px;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 16px;
}
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ---------- Loading Spinner ---------- */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
.loading-overlay {
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px;
    padding: 40px;
    color: var(--text-muted); font-size: 14px;
}

/* ---------- WhatsApp FAB ---------- */
.fab-whatsapp {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 52px; height: 52px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    z-index: 500;
    transition: all var(--transition);
}
.fab-whatsapp:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.5); }

/* ── Hızlı Menü FAB ────────────────────────────────────────────── */
.qfab-wrap {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Ana buton */
.qfab-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(230,57,70,.45);
    transition: transform .25s, background .2s;
}
.qfab-btn:hover { transform: scale(1.08); }
.qfab-btn.open { background: #444; transform: rotate(45deg); }

/* Menü listesi */
.qfab-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s, transform .2s;
    margin-bottom: 4px;
}
.qfab-menu.open {
    pointer-events: all;
    opacity: 1;
    transform: translateY(0);
}

/* Her bir öğe — ikon solda, etiket sağda */
.qfab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    width: auto;
}

/* Yuvarlak ikon */
.qfab-icon {
    width: 40px; height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,.35);
    flex-shrink: 0;
    transition: transform .2s;
}
.qfab-item:hover .qfab-icon { transform: scale(1.1); }

/* Etiket */
.qfab-label {
    background: var(--bg-card);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    border: 1px solid var(--border);
}

/* Stagger */
.qfab-menu .qfab-item { transition: opacity .18s, transform .18s; opacity: 0; transform: translateY(6px); }
.qfab-menu.open .qfab-item:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0ms; }
.qfab-menu.open .qfab-item:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 40ms; }
.qfab-menu.open .qfab-item:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 80ms; }
.qfab-menu.open .qfab-item:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 120ms; }
.qfab-menu.open .qfab-item:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 160ms; }

/* Overlay */
.qfab-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 599;
}
.qfab-overlay.open { display: block; }

@media (max-width: 768px) {
    .qfab-wrap { bottom: 16px; left: 16px; }
    .qfab-btn { width: 48px; height: 48px; font-size: 18px; }
    .qfab-icon { width: 36px; height: 36px; min-width: 36px; font-size: 14px; }
    .qfab-label { font-size: 11px; padding: 4px 10px; }
}

/* ---------- Sidebar Overlay ---------- */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ---------- Animasyonlar ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .sidebar-overlay.show { display: block; }
    .main-wrapper { margin-left: 0; }
    .hamburger-btn { display: flex; }
    .topbar-username { display: none; }
    .topbar-buy span { display: none; }
}
@media (max-width: 768px) {
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .packages-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .table { font-size: 12.5px; }
    .table th, .table td { padding: 10px 10px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .number-query-box { padding: 20px 16px; }
    .topbar { padding: 0 12px; }
}

/* ---------- Auth Sayfaları ---------- */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    padding: 20px;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 36px 32px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 44px; }
.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }
.auth-divider { text-align: center; color: var(--text-dim); font-size: 12px; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%;
    width: 40%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-link { color: var(--primary); font-weight: 600; }
.auth-link:hover { text-decoration: underline; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.password-toggle {
    position: relative;
}
.password-toggle .form-control { padding-right: 42px; }
.password-toggle-btn {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 15px;
    background: none; border: none; cursor: pointer;
    transition: color var(--transition);
}
.password-toggle-btn:hover { color: var(--primary); }

/* ---------- Sipariş Adımları ---------- */
.order-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 32px; flex-wrap: wrap;
}
.order-step {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    font-size: 13px; font-weight: 600;
    color: var(--text-dim);
}
.order-step.active { color: var(--primary); }
.order-step.done { color: var(--accent); }
.order-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
    border: 2px solid var(--border);
    color: var(--text-dim);
}
.order-step.active .order-step-num { border-color: var(--primary); color: var(--primary); background: rgba(230,57,70,0.1); }
.order-step.done .order-step-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.order-step-line { width: 40px; height: 2px; background: var(--border); }
.order-step.done + .order-step-line { background: var(--accent); }

/* ---------- Grafik Alanı ---------- */
.chart-container { position: relative; height: 220px; }

/* ---------- Profil ---------- */
.profile-header {
    display: flex; align-items: center; gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.profile-avatar-large {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff; flex-shrink: 0;
}
.profile-info h2 { font-size: 20px; font-weight: 800; }
.profile-info p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
    padding: 10px 16px;
    font-size: 13.5px; font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius) var(--radius) 0 0;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

/* ---------- Tooltip ---------- */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: var(--bg-3); color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 10px; border-radius: 6px;
    font-size: 12px; white-space: nowrap;
    pointer-events: none; opacity: 0;
    transition: opacity 0.2s; z-index: 300;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ---------- Modal Overlay ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: fadeIn 0.2s ease;
    max-height: 90vh; overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-2); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all var(--transition);
}
.modal-close:hover { background: rgba(230,57,70,0.15); color: var(--primary); }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ---------- Slide-in Sepet Drawer ---------- */
.cart-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1900;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.cart-drawer-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed; top: 0; right: 0;
    width: 380px; max-width: 95vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cart-drawer-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cart-drawer-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-2); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; transition: all var(--transition);
}
.cart-drawer-close:hover { background: rgba(230,57,70,0.15); color: var(--primary); }

.cart-drawer-body {
    flex: 1; overflow-y: auto;
    padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
}

.cart-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.cart-item-box {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.cart-item-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.cart-item-label { font-size: 12px; color: var(--text-muted); }
.cart-item-value { font-size: 14px; font-weight: 600; color: var(--text); }
.cart-item-price { font-size: 22px; font-weight: 800; color: var(--primary); }

/* Sepet FAB butonu */
.cart-fab {
    position: fixed;
    bottom: 84px; right: 24px;
    width: 48px; height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(230,57,70,0.45);
    z-index: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}
.cart-fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(230,57,70,0.55); }
.cart-fab-badge {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px;
    background: #fff; color: var(--primary);
    border-radius: 50%;
    font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--primary);
}

/* ─── Admin Panel Layout Fix ─────────────────────────────────────────── */
/* Admin header uses hamburger (not sidebar-close), ensure it's visible on mobile */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
}
.hamburger:hover { color: var(--text); background: var(--bg-hover); }

@media (max-width: 1024px) {
    .hamburger { display: flex; align-items: center; }
}

/* ─── Buy Page Sekme + Paket Grid Düzeltmesi ─────────────────────────── */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
@media (max-width: 600px) {
    .packages-grid { grid-template-columns: 1fr; }
    .tabs { gap: 2px; padding: 3px; }
    .tab-btn { padding: 8px 10px; font-size: 11px; gap: 4px; }
}

/* ─── Alert Info Banner ──────────────────────────────────────────────── */
.alert-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(17,138,178,0.1);
    border: 1px solid rgba(17,138,178,0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: #118ab2;
}
[data-theme="light"] .alert-info-banner { color: #0c6a8a; }

/* ─── Package Card Fixes ─────────────────────────────────────────────── */
.package-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    overflow: hidden;
}
.package-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230,57,70,0.15);
}
.package-card.popular {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(230,57,70,0.2);
    padding-top: 38px;
}
.popular-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 2;
}
.package-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 12px;
}
.package-name {
    font-size: 17px; font-weight: 800;
    margin-bottom: 6px;
}
.package-price {
    font-size: 26px; font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.package-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.package-desc {
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 16px; line-height: 1.5;
}
.package-features {
    list-style: none;
    margin-bottom: 20px;
    flex: 1;
}
.package-features li {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; padding: 5px 0;
    border-bottom: 1px solid var(--border);
}
.package-features li:last-child { border-bottom: none; }
.package-features li i { color: var(--accent); font-size: 11px; flex-shrink: 0; }

/* ─── Number Query Box ────────────────────────────────────────────────── */
.number-query-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
}
.number-query-box h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.number-query-box p { color: var(--text-muted); font-size: 14px; max-width: 480px; margin: 0 auto; }

/* ─── Content Area (Admin Header) ───────────────────────────────────── */
.content-area {
    flex: 1;
    padding: 24px;
}
@media (max-width: 768px) {
    .content-area { padding: 16px; }
}

/* ─── Admin topbar hamburger fix ─────────────────────────────────────── */
.topbar .hamburger {
    display: none;
    color: var(--text-muted);
    font-size: 20px;
    padding: 6px 10px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    align-items: center;
    justify-content: center;
}
.topbar .hamburger:hover { color: var(--text); background: var(--bg-hover); }
@media (max-width: 1024px) {
    .topbar .hamburger { display: flex; }
}

/* ================================================================
   MOBİL ULTRA İYİLEŞTİRMELER - Kapsamlı Mobil Optimizasyon
   ================================================================ */

/* ── WhatsApp FAB - Destek butonuyla çakışma düzeltmesi ────────── */
.fab-whatsapp {
    bottom: 20px;
    right: 20px;
    z-index: 400;
}

/* Destek sayfasında "Desteği Görüntüle" butonu FAB altında kalmasın */
.support-view-btn {
    position: relative;
    z-index: 10;
}

/* ── Son giriş - Mobil subtitle wrap ───────────────────────────── */
.page-header-subtitle {
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

/* ── Dashboard grid - mobil ─────────────────────────────────────── */
@media (max-width: 768px) {
    /* Stats grid - 2 sütun güzel görünüm */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 14px;
        gap: 10px;
        border-radius: 12px;
    }
    .stat-icon {
        width: 42px; height: 42px;
        font-size: 18px;
        border-radius: 10px;
        flex-shrink: 0;
    }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 11px; }

    /* Dashboard 2-col grid → tek kolon */
    div[style*="grid-template-columns:1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Page header düzeltme */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }
    .page-header > div:last-child {
        width: 100%;
    }
    .page-header > div:last-child .btn {
        width: 100%;
        justify-content: center;
    }
    .page-header-title { font-size: 18px; }

    /* Kartlar */
    .card { border-radius: 12px; }
    .card-header { padding: 12px 16px; }
    .card-body { padding: 16px; }

    /* Tablo mobil */
    .table th, .table td { padding: 9px 10px; font-size: 12px; }
    
    /* Hızlı erişim butonları - 2 sütun */
    .quick-access-btn {
        border-radius: 12px;
        padding: 14px 10px;
        font-size: 12px;
    }

    /* Form row */
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* Alert banner mobil */
    .alert-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .alert-banner .btn { width: 100%; justify-content: center; }

    /* WhatsApp banner mobil */
    .whatsapp-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .whatsapp-banner .btn { width: 100%; justify-content: center; }

    /* Package tabs mobil */
    .tabs { 
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab-btn {
        white-space: nowrap;
        font-size: 12px;
        padding: 8px 12px;
        flex-shrink: 0;
    }

    /* SIP grid - tek kolon */
    .sip-grid { grid-template-columns: 1fr; }
    
    /* Topbar mobil */
    .topbar { padding: 0 12px; height: 56px; }
    --topbar-h: 56px;

    /* Page content */
    .page-content { padding: 14px; }

    /* Flash message */
    .flash-message { margin: 10px 14px 0; font-size: 13px; }

    /* Support sayfası düzenlemeleri */
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    /* SIP bilgileri panelleri - mobil yan yana kalsın ama scroll edilebilsin */
    .sip-panels-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Numbers page */
    .number-query-box { padding: 20px 14px; }
    .number-input-group input { font-size: 15px; }

    /* Stats chart */
    .chart-container { height: 180px; }

    /* Buttons */
    .btn { font-size: 13px; }
    .btn-sm { font-size: 12px; padding: 6px 10px; }
    
    /* Order steps mobil */
    .order-steps { gap: 0; }
    .order-step { padding: 6px 8px; font-size: 11px; }
    .order-step-line { width: 20px; }
    
    /* Profile header */
    .profile-header { flex-direction: column; text-align: center; padding: 16px; }
    .profile-info h2 { font-size: 17px; }

    /* Topbar sağ taraf - sadece ikonları göster */
    .topbar-right .btn span { display: none; }
}

@media (max-width: 480px) {
    /* Stat kartlar tek sütun */
    .stats-grid { grid-template-columns: 1fr; }

    /* FAB pozisyon */
    .fab-whatsapp { bottom: 16px; right: 14px; width: 46px; height: 46px; font-size: 22px; }

    /* Tablo - overflow ve küçük font */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { min-width: 400px; }

    /* Destek sayfası form */
    .support-form-card .form-row { grid-template-columns: 1fr; }

    /* SIP kopyala butonu */
    .sip-item-value { font-size: 12px; word-break: break-all; }

    /* Page header title */
    .page-header-title { font-size: 16px; }

    /* Topbar breadcrumb kısa tut */
    .topbar-breadcrumb { font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Buy page tabs - yatay scroll */
    .tabs { border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
    .tab-btn { border-radius: 8px; }
    .tab-btn.active { background: var(--primary); color: #fff !important; }
}

/* ── Ticket detay sayfası - mobil mesaj baloncukları ─────────── */
@media (max-width: 600px) {
    /* Ticket mesajları - tam genişlik */
    div[style*="flex-direction:row-reverse"] > div:last-child,
    div[style*="flex-direction: row-reverse"] > div:last-child {
        max-width: 90% !important;
    }
}

/* ── Hızlı erişim butonları ──────────────────────────────────── */
.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
}
.quick-access-btn:hover {
    border-color: var(--primary);
    background: rgba(230,57,70,0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.quick-access-btn span { font-size: 12px; line-height: 1.3; text-align: center; }

/* ── WhatsApp Banner ────────────────────────────────────────── */
.whatsapp-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(37,211,102,0.08), rgba(29,168,81,0.05));
    border: 1px solid rgba(37,211,102,0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
}

/* ── Admin Mobil ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .content-area { padding: 14px; }
    
    /* Admin 2-col grid → tek kolon */
    div[style*="grid-template-columns:1fr 1fr;gap:20px"] {
        grid-template-columns: 1fr !important;
    }
    /* Admin detay sağ panel */
    div[style*="grid-template-columns:1fr 280px"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-template-columns:1fr 260px"] {
        grid-template-columns: 1fr !important;
    }
    /* Ticket yanıt grid */
    div[style*="grid-template-columns:1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
    }
    .hide-mobile { display: none !important; }
}

/* ── Destek - "Desteği Görüntüle" butonunu FAB'ın üstüne çıkar ─ */
.ticket-view-btn-wrap {
    position: relative;
    z-index: 450;
    margin-bottom: 4px;
}

/* ── Yatay scroll tablolar için mobil touch ─────────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Improved input focus ring ─────────────────────────────── */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.15);
    outline: none;
}

/* ── Smooth transition for all interactive elements ─────────── */
.btn, .nav-item, .stat-card, .package-card, .quick-access-btn {
    transition: all 0.2s ease;
}

/* ── Admin topbar hamburger görünürlük fix ──────────────────── */
@media (max-width: 1024px) {
    .hamburger, .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .sidebar { z-index: 1100; }
    .sidebar-overlay { z-index: 1050; }
}

/* ── Nav badge ──────────────────────────────────────────────── */
.nav-badge {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* ================================================================
   SAYFA BAZLI MOBİL DÜZELTMELER
   ================================================================ */

/* ── SMS Sayfası ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sms-send-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* ── SIP Sayfası ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sip-two-col {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 14px !important;
    }
    .sip-item-value {
        font-size: 13px;
        word-break: break-all;
        font-family: monospace;
    }
}

/* ── IVR Sayfası ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ivr-two-col {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* ── İstatistik Sayfası - grafik ────────────────────────────────── */
@media (max-width: 768px) {
    canvas#callChart { max-height: 200px; }
}

/* ── Destek Sayfası - mobil kart görünümü ───────────────────────── */
.support-table-wrap { display: block; }
.support-cards-wrap { display: none; }

@media (max-width: 700px) {
    .support-table-wrap { display: none; }
    .support-cards-wrap { display: block; padding: 12px; }
    .ticket-card {
        background: var(--bg-2);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .ticket-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
    .ticket-card-subject { font-weight: 700; font-size: 14px; flex: 1; margin-right: 8px; }
    .ticket-card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
    .ticket-card-num { font-family: monospace; font-size: 11px; color: var(--text-dim); }
    .ticket-card-date { font-size: 11px; color: var(--text-muted); }
    .ticket-card-btn { width: 100%; justify-content: center; }
}

/* ── Profil Sayfası ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
    }
    .profile-info h2 { font-size: 18px; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tab-btn { white-space: nowrap; flex-shrink: 0; }
}

/* ── Fatura Sayfası ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .invoices-table-wrap { display: none; }
    .invoices-cards-wrap { display: block !important; }
}
.invoices-cards-wrap { display: none; }

/* ── Dashboard - küçük ekranda tek sütun ─────────────────────────── */
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Hızlı erişim butonu grid - 2 sütun korusun */
    div[style*="minmax(140px"] { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* ── Topbar - mobil marka adı göster ───────────────────────────── */
@media (max-width: 400px) {
    .topbar-breadcrumb { max-width: 90px; font-size: 12px; }
    .topbar { padding: 0 10px; }
    .topbar-right { gap: 4px; }
}

/* ── Genel tablo iyileştirmesi - yatay scroll ───────────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 12px 12px;
}

/* ── Numara yönlendirme kartları ────────────────────────────────── */
@media (max-width: 600px) {
    div[style*="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap"] {
        flex-direction: column;
        align-items: flex-start !important;
    }
    div[style*="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap"] .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Paket kartları - mobil tek sütun ──────────────────────────── */
@media (max-width: 500px) {
    .packages-grid { grid-template-columns: 1fr !important; }
    .package-card { padding: 18px; }
    .package-price { font-size: 22px; }
}

/* ── Buy/dee sayfası - order steps ─────────────────────────────── */
@media (max-width: 500px) {
    .order-step span { display: none; }
    .order-step { padding: 6px 4px; }
    .order-step-line { width: 14px; }
}

/* ── SMS Başlıkları sayfası ─────────────────────────────────────── */
@media (max-width: 600px) {
    .sms-header-form-wrap, .sms-header-list-wrap {
        grid-column: 1 / -1 !important;
    }
}

/* ── Arama paketleri ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .packages-grid { grid-template-columns: 1fr; }
    .package-card { padding: 16px; }
}

/* ── Alert banner - genel mobil ─────────────────────────────────── */
@media (max-width: 600px) {
    .alert-banner { padding: 12px 14px; gap: 10px; }
    .alert-info-banner { padding: 10px 12px; font-size: 12px; }
}

/* ── Empty state ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .empty-state { padding: 32px 16px; }
    .empty-state-icon { font-size: 40px; }
    .empty-state h3 { font-size: 16px; }
    .empty-state p { font-size: 13px; }
    .empty-state .btn { width: 100%; justify-content: center; }
}

/* ── Flash mesajlar ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .flash-message { margin: 8px 12px 0; padding: 10px 12px; font-size: 12px; }
}

/* ── Auth sayfaları ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card { padding: 24px 18px; }
    .auth-title { font-size: 18px; }
}

/* ── Dashboard 2-col ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .dashboard-two-col {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 14px !important;
    }
}

/* ── Admin panel - 2-col grids ───────────────────────────────── */
@media (max-width: 768px) {
    .sip-two-col,
    .ivr-two-col,
    .sms-send-grid,
    .dashboard-two-col {
        grid-template-columns: 1fr !important;
    }
}

/* ── Genel Mobil İyileştirmeler ──────────────────────────────── */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-header-title { font-size: 18px; }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .card-body { padding: 16px; }
    table { font-size: 13px; }
    .btn { font-size: 13px; }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
    }
    .packages-grid {
        grid-template-columns: 1fr !important;
    }
    .popular-badge {
        font-size: 9px;
        padding: 4px 10px;
        letter-spacing: 0.5px;
    }
}

/* ── Tablo mobil yatay scroll ────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .table-responsive table { min-width: 600px; }
}

/* ── Form kontrolleri mobil ──────────────────────────────────── */
@media (max-width: 600px) {
    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr !important;
    }
    .btn-group-row {
        flex-direction: column;
    }
}
