:root {
    --mv-primary: #4f46e5;
    --mv-sidebar: #1e1b4b;
    --mv-sidebar-hover: #312e81;
}

body {
    background: #f6f7fb;
    color: #1f2937;
}

.guest-body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #e0e7ff, #f8fafc 48%);
}

.auth-card {
    max-width: 460px;
    border-radius: 1rem;
}

.auth-logo,
.brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.auth-logo {
    color: #1f2937;
}

.auth-logo span,
.brand span {
    color: #a5b4fc;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--mv-sidebar);
    color: #c7d2fe;
    display: flex;
    flex-direction: column;
}

.sidebar > .brand {
    display: block;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.workspace-name {
    margin: .75rem 1rem .25rem;
    padding: .65rem .75rem;
    overflow: hidden;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #26255b;
    border-radius: .55rem;
}

.sidebar-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: .25rem 0 1rem;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .55rem 1.5rem;
    color: #c7d2fe;
    font-size: .875rem;
    text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: var(--mv-sidebar-hover);
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 0 #a5b4fc;
}

.sidebar-nav a i {
    width: 1rem;
    text-align: center;
}

.sidebar .nav-section {
    padding: 1rem 1.5rem .25rem;
    color: #818cf8;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    color: #a5b4fc;
    font-size: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.app-shell {
    min-height: 100vh;
    margin-left: 240px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.topbar form {
    margin: 0;
}

.support-banner {
    padding: .5rem 1.5rem;
    color: #3b2600;
    text-align: center;
    background: #f59e0b;
    font-weight: 600;
}

.stat-card {
    border: 0;
    border-radius: .8rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.page-header {
    margin-bottom: 1.25rem;
}

.page-content {
    /* wrapper pour cohérence avec la V1 */
}

/* Badges statut campagne */
.badge-draft     { color: #475569; background: #f1f5f9; }
.badge-ready     { color: #1e40af; background: #dbeafe; }
.badge-scheduled { color: #6b21a8; background: #f3e8ff; }
.badge-sending   { color: #92400e; background: #fef3c7; }
.badge-sent      { color: #166534; background: #dcfce7; }
.badge-paused    { color: #c2410c; background: #ffedd5; }
.badge-error     { color: #991b1b; background: #fee2e2; }

.btn-primary {
    background: var(--mv-primary);
    border-color: var(--mv-primary);
}

.contacts-production-view {
    margin: -1.5rem;
}

.contacts-production-view .page-header {
    padding: 1.5rem 1.5rem .5rem;
}

.contacts-production-view .page-content {
    padding: 0 1.5rem 2rem;
}

.contacts-count {
    font-size: .85rem;
}

.contacts-production-table {
    font-size: .9rem;
    white-space: nowrap;
}

.contacts-production-table th {
    padding: .65rem .5rem;
    color: #475569;
    font-size: .78rem;
    text-transform: none;
}

.contacts-production-table td {
    padding: .5rem;
    font-size: .82rem;
}

.contact-email {
    font-size: .85rem;
}

.contact-source-file {
    max-width: 240px;
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
}

.contact-address {
    min-width: 180px;
    max-width: 260px;
    font-size: .82rem;
    white-space: normal;
}

.contact-date {
    font-size: .78rem;
}

.contact-tag {
    max-width: 180px;
    overflow: hidden;
    font-size: .82rem;
    text-overflow: ellipsis;
}

.badge-active {
    color: #166534;
    background: #dcfce7;
}

.badge-unsubscribed {
    color: #713f12;
    background: #fef9c3;
}

.badge-invalid {
    color: #991b1b;
    background: #fee2e2;
}

.badge-blacklisted {
    color: #6b21a8;
    background: #f3e8ff;
}

.badge-archived {
    color: #475569;
    background: #f1f5f9;
}

.contacts-pagination-summary {
    font-size: .78rem;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .sidebar-footer {
        display: none;
    }

    .app-shell {
        margin-left: 0;
    }

    .contacts-production-view {
        margin: -1rem;
    }

    .contacts-production-view .page-header {
        padding: 1rem 1rem .5rem;
    }

    .contacts-production-view .page-content {
        padding: 0 1rem 1rem;
    }
}
