/* -----------------------------------------------------------
   ADMIN PANEL PREMIUM V4
   Design : Apple / Linear / Vercel inspired
   Ambiance : Dark glass, neon glow, soft shadows
   ----------------------------------------------------------- */

/* ---------- ROOT VARIABLES ---------- */
:root {
    --bg-main: radial-gradient(circle at top, #0f172a 0%, #020617 62%, #000 100%);
    --bg-card: rgba(15,23,42,0.85);
    --bg-card-strong: rgba(15,23,42,0.95);

    --border-soft: rgba(255,255,255,.12);
    --border-medium: rgba(255,255,255,.2);

    --txt-main: #e5e7eb;
    --txt-muted: #9ca3af;

    --glow-blue: #3b82f6;
    --glow-green: #22c55e;
    --glow-purple: #a855f7;
    --glow-yellow: #eab308;

    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;

    --shadow-strong: 0 18px 45px rgba(0,0,0,.55);
    --shadow-soft: 0 8px 22px rgba(0,0,0,.28);

    --anim-base: cubic-bezier(.4, 0, .3, 1);
}

/* ---------- GLOBAL RESET ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.dark-body {
    margin: 0;
    background: var(--bg-main);
    color: var(--txt-main);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- LINKS ---------- */
a {
    text-decoration: none;
    color: inherit;
}

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

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: 250px;
    background: rgba(2,6,23,0.92);
    border-right: 1px solid var(--border-soft);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    backdrop-filter: blur(20px);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 100%;
    background: linear-gradient(135deg, var(--glow-blue), #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 700;
    font-size: 17px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

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

.logo-sub {
    font-size: 12px;
    color: var(--txt-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--txt-muted);
    font-size: 14px;
    transition: .25s var(--anim-base);
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--txt-main);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--glow-blue), var(--glow-green));
    color: #fff;
}

/* ---------- MAIN PANEL ---------- */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(18px);
    background: rgba(15,23,42,0.85);
    border-bottom: 1px solid var(--border-medium);
    z-index: 20;
}

.topbar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* ---------- CONTENT ---------- */
.main-content {
    padding: 32px;
}

.page-title {
    font-size: 26px;
    margin: 0 0 18px;
}

/* ---------- STAT CARDS ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 26px;
    margin-bottom: 32px;
}

.card {
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    padding: 24px;
    box-shadow: var(--shadow-strong);
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 700;
}

.stat-caption {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--txt-muted);
}

.card-header-line {
    font-size: 13px;
    color: var(--txt-muted);
    margin-bottom: 8px;
}

/* ---------- BUTTONS ---------- */
.btn-primary-outline {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(129,140,248,.7);
    color: #fff;
    font-size: 14px;
    transition: .25s var(--anim-base);
}

.btn-primary-outline:hover {
    background: rgba(129,140,248,.25);
}

.btn-primary {
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--glow-blue), var(--glow-green));
    border: none;
    color: #fff;
}

.btn-ghost {
    padding: 8px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--txt-muted);
}

/* ---------- QUICK ACCESS CARDS (ULTRA CARDS) ---------- */
.ultra-links-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.ultra-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 22px;
    height: 120px;

    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);

    background: linear-gradient(140deg, var(--bg-card), var(--bg-card-strong));
    backdrop-filter: blur(18px);

    box-shadow: var(--shadow-soft);
    transform: translateY(0);
    transition: .35s var(--anim-base);
}

.ultra-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-strong);
}

.ultra-icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, rgba(96,165,250,.4), rgba(30,58,138,1));
    border: 1px solid rgba(255,255,255,.2);

    font-size: 24px;

    box-shadow:
        inset 0 0 16px rgba(0,0,0,.4),
        0 10px 20px rgba(0,0,0,.35);

    transition: .35s var(--anim-base);
}

.ultra-card:hover .ultra-icon {
    transform: scale(1.07) rotate(1deg);
}

.ultra-content {
    display: flex;
    flex-direction: column;
}

.ultra-title {
    font-size: 17px;
    font-weight: 600;
}

.ultra-url {
    font-size: 13px;
    color: var(--txt-muted);
}

/* BADGES */
.ultra-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(8px);
    transition: .3s ease;
}

.ultra-badge-site { background: linear-gradient(135deg, #0284c7, #0ea5e9); }
.ultra-badge-admin { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.ultra-badge-shop { background: linear-gradient(135deg, #16a34a, #22c55e); }
.ultra-badge-master { background: linear-gradient(135deg, #ca8a04, #eab308); }

.ultra-card:hover .ultra-badge {
    transform: scale(1.07);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }
    .main-content {
        padding: 18px;
    }
}
/* --- Agenda Styles (premium) --- */

.agenda-table .table td {
    vertical-align: top;
}

/* Date en forme de petite capsule */
.date-chip {
    background: rgba(148,163,184,.15);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    display: inline-block;
}

/* Description avec encadré doux */
.desc-box {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(148,163,184,.25);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #cbd5e1;
    max-width: 280px;
    white-space: pre-line;
}

/* Nom des utilisateurs (pris par) */
.user-chip {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

/* Meilleure lisibilité du tableau */
.table tr:hover td {
    background: rgba(59,130,246,.20);
    transition: .2s;
}
/* --- Restaurants / Clients Pros --- */

.phone-chip {
    background: rgba(14,165,233,.15);
    color: #7dd3fc;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.date-chip {
    background: rgba(148,163,184,.15);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.note-box {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(148,163,184,.25);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #cbd5e1;
    max-width: 280px;
    cursor: help;
}

.restaurants-table .table tr td {
    vertical-align: middle;
}

.stats-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
/* --- Notifications / Historique --- */

.notifications-table .table td {
    vertical-align: top;
}

/* Date capsule */
.date-chip {
    background: rgba(148,163,184,.15);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    display: inline-block;
}

/* Encadré du message */
.notif-message {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(148,163,184,.25);
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.4;
}

/* Badges de types */
.badge-blue {
    background: rgba(14,165,233,.25);
    color: #7dd3fc;
    border-color: rgba(14,165,233,.45);
}

.badge-purple {
    background: rgba(147,51,234,.25);
    color: #e9d5ff;
    border-color: rgba(147,51,234,.45);
}

.badge-gray {
    background: rgba(148,163,184,.20);
    color: #cbd5e1;
    border-color: rgba(148,163,184,.40);
}

/* Badges "lu ?" */
.badge-orange {
    background: rgba(245,158,11,.18);
    color: #fed7aa;
    border-color: rgba(245,158,11,.4);
}

.badge-green {
    background: rgba(22,163,74,.18);
    color: #bbf7d0;
    border-color: rgba(22,163,74,.45);
}

.badge-red {
    background: rgba(239,68,68,.15);
    color: #fecaca;
    border-color: rgba(239,68,68,.45);
}

.badge-amber {
    background: rgba(251,191,36,.20);
    color: #fef3c7;
    border-color: rgba(251,191,36,.45);
}
/* Lien Google Maps premium */
.map-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
}

.map-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}
