/* Aysima Hediyelik yönetim paneli
   Görünüm miskokanevler shop panelinden örnek alındı (lacivert menü, mavi ana renk, Inter). */

:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --body-bg: #f1f5f9;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body { font-family: var(--bs-body-font-family); background: var(--body-bg); color: var(--text); font-size: .9rem; }
a { color: var(--primary-color); }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--sidebar-bg); z-index: 1000; overflow-y: auto; transition: transform .3s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; }
.sidebar-brand-icon { width: 36px; height: 36px; flex-shrink: 0; background: linear-gradient(135deg, var(--primary-color), #8b5cf6); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.sidebar-brand-text { color: #fff; font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.sidebar-nav { padding: .5rem 0 1rem; }
.sidebar-nav-title { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #64748b; padding: 1rem 1.5rem .4rem; }
.sidebar-nav-item { margin: .125rem .75rem; }
.sidebar-nav-link { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; color: var(--sidebar-text); text-decoration: none; border-radius: 8px; font-size: .875rem; font-weight: 500; transition: all .2s ease; }
.sidebar-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav-link.active { background: var(--primary-color); color: #fff; }
.sidebar-nav-link.disabled { opacity: .45; cursor: default; }
.sidebar-nav-link.disabled:hover { background: none; color: var(--sidebar-text); }
.sidebar-nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.sidebar-nav-badge { margin-left: auto; background: #ef4444; color: #fff; font-size: .6875rem; font-weight: 600; padding: .125rem .5rem; border-radius: 10px; }
.sidebar-nav-soon { margin-left: auto; font-size: .625rem; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; display: none; }
.sidebar-overlay.show { display: block; }

/* ---------- Header ---------- */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }
.main-header { height: var(--header-height); background: #fff; border-bottom: 1px solid var(--border); padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.header-right { display: flex; align-items: center; gap: .5rem; }
.sidebar-toggle { display: none; border: 0; background: none; font-size: 1.5rem; color: var(--muted); padding: 0; }
.header-user { display: flex; align-items: center; gap: .75rem; padding: .375rem .75rem; border-radius: 8px; cursor: pointer; }
.header-user:hover { background: #f1f5f9; }
.header-user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: .8rem; }
.header-user-info { line-height: 1.3; }
.header-user-name { font-weight: 600; font-size: .8125rem; }
.header-user-role { font-size: .75rem; color: var(--muted); }

/* ---------- Page ---------- */
.page-content { padding: 1.5rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; }
.page-back { color: var(--muted); font-size: 1.25rem; text-decoration: none; }
.page-back:hover { color: var(--primary-color); }
.page-subtitle { color: var(--muted); margin: 0; font-size: .875rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: 12px; box-shadow: var(--card-shadow); margin-bottom: 1.5rem; border: none; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); background: transparent; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-body { padding: 1.25rem; }
.card-footer { background: transparent; border-top: 1px solid var(--border); padding: .75rem 1.25rem; }
.filter-card { margin-bottom: 1rem; }
.filter-card .card-body { padding: 1rem 1.25rem; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.stat-cards .card { margin-bottom: 0; }
.stat-card-link { text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease; }
.stat-card-link:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); }
.stat-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.stat-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-card-icon.blue   { background: rgba(37,99,235,.1);  color: #2563eb; }
.stat-card-icon.green  { background: rgba(16,185,129,.1); color: #10b981; }
.stat-card-icon.purple { background: rgba(139,92,246,.1); color: #8b5cf6; }
.stat-card-icon.red    { background: rgba(239,68,68,.1);  color: #ef4444; }
.stat-card-icon.orange { background: rgba(249,115,22,.1); color: #f97316; }
.stat-card-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: .25rem; }
.stat-card-label { font-size: .875rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--border); padding: .8rem 1rem; text-align: left; white-space: nowrap; }
.data-table th.text-end { text-align: right; }
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; font-size: .875rem; vertical-align: middle; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.th-sort i { font-size: .65rem; opacity: .5; }
.th-sort.active, .th-sort:hover { color: var(--primary-color); }
.th-sort.active i { opacity: 1; }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .75rem 1.25rem; border-top: 1px solid var(--border); }
.table-footer .pagination { margin: 0; }
.table-footer nav > .d-flex > .flex-fill:first-child, .table-footer nav p.small { display: none !important; }

.empty-state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty-state > i { font-size: 2.25rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------- Badges & buttons ---------- */
.badge { display: inline-flex; align-items: center; padding: .25rem .6rem; font-size: .75rem; font-weight: 500; border-radius: 6px; }
.badge-success   { background: #dcfce7; color: #16a34a; }
.badge-danger    { background: #fee2e2; color: #dc2626; }
.badge-warning   { background: #fef3c7; color: #d97706; }
.badge-info      { background: #dbeafe; color: #2563eb; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-size: .875rem; font-weight: 500; border-radius: 8px; }
.btn-primary { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.btn-danger { background: #fee2e2; border-color: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; border-color: #fecaca; color: #b91c1c; }
.btn-danger-solid { background: #dc2626; color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: .35rem .75rem; font-size: .8125rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; }

/* ---------- Forms ---------- */
.form-label { font-size: .8125rem; font-weight: 500; color: #334155; margin-bottom: .35rem; }
.form-control, .form-select { border-color: var(--border); border-radius: 8px; font-size: .875rem; padding: .5rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.input-group-text { background: #f8fafc; border-color: var(--border); font-size: .875rem; }
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.form-text { font-size: .75rem; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 12px; }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto .75rem; border-radius: 50%; background: #fee2e2; color: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* ---------- Login ---------- */
.guest-body { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 420px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: none; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .page-content { padding: 1rem; }
}
@media (max-width: 767.98px) {
    .stat-cards { grid-template-columns: 1fr; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
    .data-table tbody tr { border-bottom: 1px solid var(--border); padding: .5rem 0; }
    .data-table td { border: 0; padding: .3rem 1rem; text-align: left !important; }
    .data-table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: .6875rem; font-weight: 600; text-transform: uppercase; color: #94a3b8; }
}
