/* StreetBarons V3 - Professional Polish */
:root {
    --bg-dark: #0f0f13;
    /* Deepest Black-Blue */
    --bg-panel: #1a1a20;
    /* Panel Background */
    --bg-card: #22222a;
    /* Card Background */

    --text-main: #f0f0f0;
    --text-muted: #888899;

    --accent-gold: #d4af37;
    /* Metallic Gold */
    --accent-red: #c0392b;
    /* Blood Red */
    --accent-blue: #3498db;
    /* Police Blue */
    --accent-green: #2ecc71;
    /* Success Green */

    /* Stat Colors */
    --stat-energy: #f1c40f;
    --stat-nerve: #e74c3c;
    --stat-happy: #2ecc71;
    --stat-heat: #3498db;

    --font-heading: 'Georgia', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

a:hover {
    color: var(--accent-gold);
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.brand {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.brand h1 {
    margin: 0;
    color: var(--accent-red);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-muted);
    border-left: 3px solid transparent;
}

.menu li a:hover,
.menu li.active a {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--accent-gold);
}

.menu li a i {
    width: 30px;
    font-size: 1.1rem;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

/* --- HEADER STATS --- */
.header-stats {
    background: var(--bg-panel);
    padding: 15px 30px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.stat-group {
    display: flex;
    gap: 20px;
    flex: 1;
}

.stat-box {
    flex: 1;
    max-width: 150px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 5px;
}

.progress-bg {
    background: #333;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px currentColor;
}

/* --- DASHBOARD HERO --- */
.hero-banner {
    /* Safe Fallback + Gradient */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(15, 15, 19, 1) 100%),
        url('https://images.unsplash.com/photo-1533669955278-68256a42c26d?q=80&w=2070&auto=format&fit=crop');
    /* Reliable Athens/City URL */
    background-size: cover;
    background-position: center;
    height: 300px;
    /* Force height */
    display: flex;
    align-items: flex-end;
    padding: 40px;
    position: relative;
}

.hero-profile {
    display: flex;
    align-items: flex-end;
    gap: 25px;
    width: 100%;
    z-index: 2;
}

.avatar-frame {
    width: 140px;
    height: 140px;
    border: 4px solid var(--accent-gold);
    border-radius: 5px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    position: relative;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h1 {
    margin: 0;
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.user-info p {
    margin: 5px 0 0;
    color: #ccc;
    font-style: italic;
}

/* --- CARDS & GRID --- */
.container {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card h2 {
    margin-top: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--accent-red);
    color: #fff;
}

.btn-gold {
    background: var(--accent-gold);
    color: #000;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
}

/* --- ALERTS --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
    background: #2a2a2a;
}

.alert-success {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.alert-error {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
}

td,
th {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

th {
    color: #888;
    text-transform: uppercase;
    font-size: 0.8rem;
}