@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-gradient: radial-gradient(circle at top right, #f8fafc, #eff6ff);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --text-main: #1e293b;
    --text-muted: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Helper */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar Premium */
.navbar {
    position: sticky;
    top: 20px;
    margin: 0 2rem;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.nav-brand img {
    transition: transform 0.3s ease;
}

.nav-brand:hover img {
    transform: rotate(-10deg) scale(1.1);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-item.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Page Header */
.page-header {
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 6px;
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 4px;
}

/* KPI Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-glow);
}

.card:hover::after {
    transform: translateX(100%);
}

.card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card p {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.5rem 0;
    color: var(--text-main);
}

/* Panels */
.panel {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    padding: 0 1rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

td {
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border: none;
}

td:first-child {
    border-radius: 12px 0 0 12px;
}

td:last-child {
    border-radius: 0 12px 12px 0;
}

tr {
    transition: transform 0.2s ease;
}

tr:hover td {
    background: #f1f5f9;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.02);
    background: #4f46e5;
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* Badge Premium */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-align: center;
}

.status-online,
.status-success,
.status-repondu,
.status-pret,
.status-disponible {
    background: #dcfce7;
    color: #166534;
}

.status-busy,
.status-danger,
.status-abandonne,
.status-echec,
.status-inconnu,
.status-sans-reponse {
    background: #fee2e2;
    color: #991b1b;
}

.status-warning,
.status-sonnerie,
.status-en-pause {
    background: #fef3c7;
    color: #92400e;
}

.status-info,
.status-en-ligne,
.status-en-appel {
    background: #e0f2fe;
    color: #0369a1;
}

/* Wallboard Mode */
.wallboard-active {
    background: #0f172a;
    color: white;
}

.wallboard-active .navbar,
.wallboard-active .panel,
.wallboard-active .card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.wallboard-active h1,
.wallboard-active h2,
.wallboard-active .card p {
    color: white;
}

.wallboard-active td {
    background: rgba(255, 255, 255, 0.03);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}