/* ══ GLOBAL VARIABLES (Merged Design) ══ */
:root {
    --bg: #0d1117; 
    --surface: #161b22; 
    --surface2: #1c2330;
    --border: #2a3441; 
    --gold: #d4a843; 
    --gold-dim: #a07830;
    --gold-light: #f0c060; 
    --green: #3fb950; 
    --green-dim: #238636;
    --red: #f85149; 
    --blue: #58a6ff;
    --text: #e6edf3; 
    --muted: #7d8590;
}

/* ══ BASE RESET ══ */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background: var(--bg); 
    color: var(--text); 
    font-family: 'Segoe UI', Tahoma, 'SolaimanLipi', sans-serif; 
    min-height: 100vh; 
    font-size: 14px; 
    line-height: 1.6;
}

/* ══ HEADER & NAVIGATION ══ */
.header { 
    background: linear-gradient(135deg, #0d1117, #1a1200, #0d1117); 
    border-bottom: 1px solid var(--gold-dim); 
    padding: 14px 16px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.logo { 
    width: 40px; height: 40px; 
    background: linear-gradient(135deg, var(--gold), var(--gold-dim)); 
    border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; flex-shrink: 0; 
}

.header h1 { font-size: 16px; color: var(--gold-light); }
.header p { font-size: 11px; color: var(--muted); margin-top: 2px; }

.nav { 
    display: flex; gap: 4px; padding: 10px 12px; 
    border-bottom: 1px solid var(--border); 
    background: var(--surface); 
    overflow-x: auto; 
    scrollbar-width: none; 
}

.tab { 
    padding: 7px 13px; border-radius: 8px; font-size: 13px; 
    cursor: pointer; border: 1px solid transparent; 
    background: transparent; color: var(--muted); 
    white-space: nowrap; transition: all .2s; 
    text-decoration: none;
}

.tab.active { 
    background: rgba(212,168,67,0.12); 
    border-color: var(--gold-dim); 
    color: var(--gold-light); 
}

/* ══ LAYOUT & GRID ══ */
.main { padding: 16px; max-width: 860px; margin: 0 auto; }

.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 18px; 
}

.card { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 14px; 
}

.card-label { 
    font-size: 11px; color: var(--muted); 
    text-transform: uppercase; letter-spacing: .7px; 
    margin-bottom: 5px; 
}

.card-val { font-family: monospace; font-size: 18px; font-weight: bold; }

/* Color Helpers */
.gold { color: var(--gold-light); } 
.green { color: var(--green); } 
.red { color: var(--red); } 
.blue { color: var(--blue); }

/* ══ TABLES ══ */
.table-wrap { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 20px; 
    overflow-x: auto; 
}

table { width: 100%; border-collapse: collapse; min-width: 420px; }

thead th { 
    padding: 10px 12px; text-align: left; 
    font-size: 11px; font-weight: 600; color: var(--muted); 
    text-transform: uppercase; background: var(--surface2); 
    border-bottom: 1px solid var(--border); 
}

tbody td { padding: 11px 12px; font-size: 13px; border-bottom: 1px solid var(--surface2); }
.mono { font-family: monospace; }

/* ══ UTILITIES ══ */
.sec-header { 
    display: flex; align-items: center; justify-content: space-between; 
    margin-bottom: 14px; 
}

.sec-title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.bar { width: 3px; height: 18px; background: var(--gold); border-radius: 2px; }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .emoji { font-size: 34px; margin-bottom: 8px; }

/* ══ FORMS & BUTTONS ══ */
input, select, textarea { 
    width: 100%; background: var(--bg); 
    border: 1px solid var(--border); 
    border-radius: 8px; padding: 10px 12px; 
    color: var(--text); outline: none; 
}

input:focus { border-color: var(--gold); }

.btn { 
    padding: 8px 14px; border-radius: 8px; font-size: 13px; 
    cursor: pointer; border: none; font-weight: 600; 
}

.btn-primary { background: var(--gold); color: #0d1117; }

.text-r { text-align: right; }
.text-l { text-align: left; }
.text-c { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }

/* ══ PAGINATION STYLING ══ */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
}

.pagination li a {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}

.pagination li.active a {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: bold;
}

.pagination li a:hover:not(.active) {
    border-color: var(--gold-dim);
    background: var(--surface2);
}

/* User Profile Styling */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background 0.3s;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    border: 2px solid #30363d;
}

.user-name {
    color: #c9d1d9;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #21262d;
}

.logout-link:hover {
    color: #ff7b72 !important;
}