/* ============================================================
   MCL Media Control Center — Stili Globali (LIGHT THEME)
   ============================================================ */

:root {
    --bg-primary: #f5f6f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f1f4;
    --border: #e2e4e9;
    --border-light: #d0d3da;
    --text-primary: #1a1c21;
    --text-secondary: #52556a;
    --text-muted: #8b8fa3;
    --accent-blue: #3b6de6;
    --accent-blue-glow: rgba(59, 109, 230, 0.10);
    --accent-green: #16a364;
    --accent-green-dim: rgba(22, 163, 100, 0.08);
    --accent-amber: #d97706;
    --accent-amber-dim: rgba(217, 119, 6, 0.08);
    --accent-red: #dc3545;
    --accent-red-dim: rgba(220, 53, 69, 0.08);
    --accent-purple: #7c3aed;
    --accent-purple-dim: rgba(124, 58, 237, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 12px 40px rgba(0,0,0,0.06);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.logo {
    display: flex; align-items: center; gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), #7c5cff);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff;
    letter-spacing: -0.5px; flex-shrink: 0;
}

.logo-text { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; }
.logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.nav-section { margin-bottom: 28px; }

.nav-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--text-muted);
    padding: 0 12px; margin-bottom: 8px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.15s;
    font-size: 13.5px; color: var(--text-secondary);
    margin-bottom: 2px; user-select: none;
}
.nav-item:hover { background: var(--bg-primary); color: var(--text-primary); }
.nav-item.active {
    background: var(--accent-blue-glow);
    color: var(--accent-blue);
    font-weight: 500;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: #fff;
    font-size: 10px; font-weight: 600;
    padding: 2px 7px; border-radius: 10px;
    min-width: 20px; text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px 0;
    border-top: 1px solid var(--border);
}

.user-pill { display: flex; align-items: center; gap: 10px; }

.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0;
}

.user-info { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   MOBILE TOGGLE
   ============================================================ */

.mobile-toggle {
    display: none;
    position: fixed; top: 16px; left: 16px; z-index: 200;
    width: 40px; height: 40px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-primary);
}
.mobile-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main {
    margin-left: 260px;
    padding: 28px 32px;
    min-height: 100vh;
}

.page-content { margin-top: 8px; }

/* ============================================================
   HEADER
   ============================================================ */

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

.header-left h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.header-left p { font-size: 13.5px; color: var(--text-secondary); margin-top: 4px; }

.header-right { display: flex; align-items: center; gap: 12px; }

.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 14px; width: 260px;
    transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--accent-blue); }
.search-box input {
    background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 13px;
    font-family: inherit; width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   NOTIFICATION BELL
   ============================================================ */

.notification-bell {
    position: relative;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: border-color 0.15s;
}
.notification-bell:hover { border-color: var(--border-light); }
.notification-bell svg { width: 18px; height: 18px; color: var(--text-secondary); }

.notification-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--accent-red); color: #fff;
    font-size: 10px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-primary);
}

.notification-dropdown {
    display: none;
    position: absolute; top: 46px; right: 0;
    width: 340px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden;
}
.notification-dropdown.open { display: block; }

.notification-dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600;
}
.notification-dropdown-header a { font-size: 12px; color: var(--accent-blue); font-weight: 500; }
.notification-dropdown-header a:hover { text-decoration: underline; }

.notification-dropdown-body { max-height: 320px; overflow-y: auto; }

.notification-item {
    display: flex; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid var(--border); transition: background 0.1s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg-card-hover); }

.notification-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notification-icon svg { width: 16px; height: 16px; }
.notification-icon.task_assigned { background: var(--accent-blue-glow); color: var(--accent-blue); }
.notification-icon.task_due { background: var(--accent-amber-dim); color: var(--accent-amber); }
.notification-icon.domain_expiring { background: var(--accent-amber-dim); color: var(--accent-amber); }
.notification-icon.site_issue { background: var(--accent-red-dim); color: var(--accent-red); }
.notification-icon.revenue_alert { background: var(--accent-green-dim); color: var(--accent-green); }
.notification-icon.system { background: var(--accent-purple-dim); color: var(--accent-purple); }

.notification-content { flex: 1; min-width: 0; }
.notification-title { font-size: 13px; font-weight: 500; }
.notification-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notification-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   BTN ICON (Logout, etc)
   ============================================================ */

.btn-icon {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all 0.15s; color: var(--text-secondary);
}
.btn-icon:hover { border-color: var(--border-light); color: var(--accent-red); }
.btn-icon svg { width: 18px; height: 18px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}