/* ── Pixel Sepeti Admin Panel — Professional Design ── */
:root {
    --bg-base: #0c0d11;
    --bg-surface: #13141a;
    --bg-elevated: #1a1b23;
    --bg-hover: #21222c;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --orange: #FF8C00;
    --orange-soft: rgba(255, 140, 0, 0.12);
    --orange-glow: rgba(255, 140, 0, 0.25);
    --green: #10B981;
    --green-soft: rgba(16, 185, 129, 0.12);
    --red: #EF4444;
    --red-soft: rgba(239, 68, 68, 0.12);
    --blue: #6366F1;
    --blue-soft: rgba(99, 102, 241, 0.12);
    --text-primary: #F1F1F4;
    --text-secondary: #8B8D9A;
    --text-muted: #5C5E6A;
    --radius: 12px;
    --sidebar-w: 260px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Screen Toggle ── */
.screen { display: none; }
.screen.active { display: flex; }

/* ═══════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════ */
#login-screen {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-bg {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 140, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        var(--bg-base);
}

.login-card {
    width: 400px;
    max-width: 92vw;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 48px 36px 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #FF8C00, #FFB347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.input-group { margin-bottom: 20px; }

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: var(--bg-base);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}

.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--orange);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF8C00, #E07800);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--orange-glow);
}

.btn-primary:active { transform: scale(0.98); }

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

.error-text {
    color: var(--red);
    font-size: 12px;
    margin-top: 14px;
    text-align: center;
    min-height: 18px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════ */
#dashboard { min-height: 100vh; flex-direction: row; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    color: var(--orange);
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--orange-soft);
    color: var(--orange);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-avatar svg {
    width: 18px;
    height: 18px;
    color: var(--orange);
}

.admin-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-role {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-soft);
}

.btn-logout svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 28px 32px;
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--orange);
}

.btn-refresh svg { width: 16px; height: 16px; }

/* ── Stats ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--border-strong); }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap svg { width: 22px; height: 22px; }

.stat-pending .stat-icon-wrap { background: var(--orange-soft); color: var(--orange); }
.stat-resolved .stat-icon-wrap { background: var(--green-soft); color: var(--green); }
.stat-total .stat-icon-wrap { background: var(--blue-soft); color: var(--blue); }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ── Tabs ── */
.tab-bar {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    width: fit-content;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover { color: var(--text-secondary); }

.tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tab-badge {
    font-size: 11px;
    font-weight: 700;
    background: var(--orange);
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ── Reports ── */
.reports-area { min-height: 300px; }

.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg { color: var(--green); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text-primary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* ── Report Card ── */
.report-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.report-card:hover { border-color: var(--border-strong); }

.report-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.report-id {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Menlo', monospace;
    background: var(--bg-base);
    padding: 3px 8px;
    border-radius: 6px;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge svg { width: 12px; height: 12px; }

.badge-pending { background: var(--orange-soft); color: var(--orange); }
.badge-resolved { background: var(--green-soft); color: var(--green); }

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.report-field {}

.report-field-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 3px;
}

.report-field-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.btn-danger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger svg { width: 15px; height: 15px; }

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 92vw;
    text-align: center;
}

.modal-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--red-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--red);
}

.modal-icon-wrap svg { width: 26px; height: 26px; }

.modal-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-cancel {
    padding: 10px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 20px 16px; }
    .stats-row { grid-template-columns: 1fr; }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
    .login-card { padding: 36px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
