/* =============================================
   GAMESTORE MANAGER - Main CSS
   ============================================= */

:root {
    --primary: #6C63FF;
    --primary-dark: #5a52d5;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --teal: #14b8a6;
    --orange: #f97316;
    --purple: #a855f7;

    --bg: #f1f5f9;
    --bg-white: #ffffff;
    --sidebar-bg: #1e1b4b;
    --sidebar-text: #c7d2fe;
    --sidebar-active: #6C63FF;

    --text: #1e293b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --radius: 10px;
    --sidebar-width: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); }
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--bg-white); border-radius: 16px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { font-size: 48px; margin-bottom: 12px; }
.login-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.login-header p { color: var(--text-muted); margin-top: 4px; }
.login-footer { text-align: center; margin-top: 20px; color: var(--text-muted); }
.login-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; transition: border-color 0.2s; background: white; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.input-password { position: relative; }
.input-password input { padding-right: 44px; }
.btn-toggle-pass { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-menu { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 8px; }

/* =============================================
   ALERTS
   ============================================= */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* =============================================
   BADGES
   ============================================= */
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-success { background: #f0fdf4; color: #16a34a; }
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-secondary { background: var(--bg); color: var(--text-muted); }
.badge-admin { background: var(--primary); color: white; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh; background: var(--sidebar-bg); display: flex; flex-direction: column; z-index: 100; transition: transform 0.3s; overflow-y: auto; }
.sidebar-header { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo { font-size: 24px; }
.sidebar-title { color: white; font-weight: 700; font-size: 15px; }
.sidebar-nav { flex: 1; padding: 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--sidebar-text); text-decoration: none; font-size: 13px; font-weight: 500; transition: all 0.2s; margin-bottom: 2px; position: relative; }
.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active { background: var(--sidebar-active); color: white; }
.nav-item .badge { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.nav-icon { font-size: 16px; }
.sidebar-footer { padding: 12px 8px; border-top: 1px solid rgba(255,255,255,0.1); }
.nav-logout:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { background: var(--bg-white); padding: 14px 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.topbar-title { font-weight: 700; font-size: 16px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.page-content { padding: 24px; }

/* =============================================
   STATS GRID
   ============================================= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-white); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); border-left: 4px solid transparent; }
.stat-blue { border-left-color: var(--info); }
.stat-green { border-left-color: var(--success); }
.stat-yellow { border-left-color: var(--warning); }
.stat-purple { border-left-color: var(--purple); }
.stat-orange { border-left-color: var(--orange); }
.stat-teal { border-left-color: var(--teal); }
.stat-icon { font-size: 32px; }
.stat-number { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

/* =============================================
   CONTENT CARDS
   ============================================= */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.content-card { background: var(--bg-white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h3 { font-size: 15px; font-weight: 700; }
.empty-state { text-align: center; padding: 32px; color: var(--text-muted); }

/* =============================================
   TABLES
   ============================================= */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: var(--bg); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .content-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal-box { background: white; border-radius: 14px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); 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-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); padding: 4px; }
.modal-box form { padding: 20px; }

/* =============================================
   TABS
   ============================================= */
.tab-bar { display: flex; gap: 4px; background: var(--bg-white); border-radius: 10px; padding: 6px; margin-bottom: 20px; box-shadow: var(--shadow); width: fit-content; }
.tab-item { padding: 8px 18px; border-radius: 7px; text-decoration: none; color: var(--text-muted); font-size: 13px; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
.tab-item.active { background: var(--primary); color: white; }
.tab-item:hover:not(.active) { background: var(--bg); color: var(--text); }

/* =============================================
   UTILITIES
   ============================================= */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.ml-auto { margin-left: auto; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }
.content-card hr { border: none; border-top: 1px solid var(--border); }
code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: monospace; }
small.text-muted { font-size: 11px; color: var(--text-muted); }
