/**
 * RADAR by Shadow to Live
 * Stylesheet v1.0.0
 * Design : lumineux, épuré, Apple-style
 */

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f5f5f7;
    --white: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-light: #86868b;
    --red: #e31e24;
    --red-light: #fef2f2;
    --green: #28a745;
    --green-light: #f0fdf4;
    --orange: #f59e0b;
    --orange-light: #fffbeb;
    --blue: #007aff;
    --blue-light: #eff6ff;
    --border: #e5e5ea;
    --border-light: #f0f0f2;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --sidebar-width: 240px;
    --header-height: 64px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LOGIN PAGE ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-branding {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-circle::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    position: absolute;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text);
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-tagline {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
    max-width: 320px;
    margin: 0 auto;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.login-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--text);
    color: var(--white);
    width: 100%;
    padding: 12px;
}

.btn-primary:hover {
    background: #333;
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: #c81a1f;
}

.btn-outline {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.login-error {
    background: var(--red-light);
    color: var(--red);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-light);
}

/* ── APP LAYOUT ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo .logo-circle {
    width: 36px;
    height: 36px;
}

.sidebar-logo .logo-circle::after {
    width: 9px;
    height: 9px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.sidebar-logo-sub {
    font-size: 10px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    padding: 8px 8px 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--text);
    color: var(--white);
}

.nav-link .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-light);
}

/* ── MAIN CONTENT ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.top-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

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

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.content-area {
    padding: 28px;
}

/* ── CARDS ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── KPI CARDS ── */
.kpi-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.kpi-change {
    font-size: 12px;
    margin-top: 4px;
}

.kpi-change.up { color: var(--green); }
.kpi-change.down { color: var(--red); }
.kpi-change.stable { color: var(--text-light); }

/* ── TABLES ── */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: var(--bg);
}

/* ── BADGES ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-red { background: var(--red-light); color: var(--red); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gray { background: var(--bg); color: var(--text-secondary); }

/* ── SCORE BAR ── */
.score-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.score-bar-fill.high { background: var(--green); }
.score-bar-fill.medium { background: var(--orange); }
.score-bar-fill.low { background: var(--red); }

/* ── ARTIST CARD (grid view) ── */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.artist-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.artist-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.artist-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg);
}

.artist-card-body {
    padding: 16px;
}

.artist-card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.artist-card-genre {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.artist-card-stats {
    display: flex;
    gap: 16px;
}

.artist-card-stat {
    font-size: 12px;
    color: var(--text-secondary);
}

.artist-card-stat strong {
    display: block;
    font-size: 15px;
    color: var(--text);
}

/* ── TABS ── */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

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

.tab.active {
    color: var(--text);
    border-bottom-color: var(--red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ── ARTIST PROFILE HEADER ── */
.artist-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.artist-photo {
    width: 160px;
    height: 160px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}

.artist-info h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.artist-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.artist-bio {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
}

.artist-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.artist-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg);
    font-size: 12px;
    color: var(--text-secondary);
    transition: background 0.15s;
}

.artist-link:hover {
    background: var(--border);
    text-decoration: none;
}

/* ── SCANNING ANIMATION ── */
.scanning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--blue-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--blue);
}

.scanning-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── MATURITY LABELS ── */
.maturity-discovery { color: var(--blue); }
.maturity-growth { color: var(--green); }
.maturity-mature { color: var(--orange); }
.maturity-decline { color: var(--red); }

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .artist-hero { flex-direction: column; }
    .content-area { padding: 16px; }
}
