/**
 * Bagelstein Déco - Thème & Styles modernes
 * Palette : Jaune Bagelstein (#f5a623 / #ffc107), Noir/Anthracite (#18181b, #27272a), Blanc (#ffffff)
 */

:root {
    --bs-bagel-yellow: #fdb813;
    --bs-bagel-yellow-hover: #e5a408;
    --bs-bagel-dark: #1e1e24;
    --bs-bagel-darker: #131316;
    --bs-bagel-gray: #f4f4f6;
    --bs-bagel-border: #e4e4e7;
    --bs-bagel-text: #27272a;
    --bs-bagel-muted: #71717a;
    --bs-bagel-accent: #e11d48;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--bs-bagel-text);
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
    background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: none;
}

.login-header {
    background: #18181b;
    color: #ffffff;
    padding: 36px 24px 28px;
    position: relative;
}

.logo-circle {
    width: 72px;
    height: 72px;
    background: var(--bs-bagel-yellow);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(253, 184, 19, 0.4);
}

.bagel-icon {
    font-size: 38px;
    line-height: 1;
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 13px;
    color: #a1a1aa;
    margin-top: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(253, 184, 19, 0.2);
    color: var(--bs-bagel-yellow);
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-content {
    padding: 32px 30px;
}

.btn-bagelstein-connect {
    background: linear-gradient(135deg, #fdb813 0%, #f59e0b 100%);
    color: #18181b;
    border: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-bagelstein-connect:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35) !important;
}

.btn-sso-icon {
    font-size: 24px;
    margin-right: 12px;
}

.btn-sso-text {
    font-size: 15px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 16px;
    color: #a1a1aa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e4e4e7;
}

.divider span {
    padding: 0 10px;
}

.login-footer {
    background: #fafafa;
    border-top: 1px solid #f4f4f6;
    padding: 16px;
    font-size: 12px;
}

/* ============================================================
   NAVBAR & HEADER
   ============================================================ */
.bagel-navbar {
    background-color: #18181b;
    border-bottom: 3px solid var(--bs-bagel-yellow);
    padding: 10px 0;
}

.navbar-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 1.5px;
    font-size: 18px;
    text-decoration: none;
}

.nav-link-custom {
    color: #d4d4d8 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-custom:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.nav-link-custom.active {
    color: #18181b !important;
    background: var(--bs-bagel-yellow) !important;
    font-weight: 700;
}

.user-badge-nav {
    background: #27272a;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid #3f3f46;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--bs-bagel-yellow);
    color: #18181b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

/* ============================================================
   STAT CARDS & DASHBOARD
   ============================================================ */
.stat-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--bs-bagel-border);
    padding: 22px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--bs-bagel-dark);
    line-height: 1.1;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-bagel-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ============================================================
   ITEM CARDS (CADRES & PLAQUES)
   ============================================================ */
.item-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--bs-bagel-border);
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.item-card-preview {
    height: 180px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--bs-bagel-border);
    overflow: hidden;
}

.item-card-preview img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.item-card-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
    padding: 15px;
}

.item-card-preview-placeholder i {
    font-size: 42px;
    margin-bottom: 6px;
    color: #cbd5e1;
}

.item-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bs-bagel-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.item-card-footer {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid var(--bs-bagel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Badges */
.badge-bagel {
    background-color: var(--bs-bagel-yellow);
    color: #18181b;
    font-weight: 700;
}

.badge-presse {
    background-color: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
}

.badge-lot {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.badge-dim {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

/* Drive Button */
.btn-drive {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-drive:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #2563eb;
}

.btn-drive-primary {
    background: #2563eb;
    border: 1px solid #1d4ed8;
    color: #ffffff;
}

.btn-drive-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}

/* ============================================================
   FILTERS & CONTROLS
   ============================================================ */
.filter-bar {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--bs-bagel-border);
    padding: 16px 20px;
    margin-bottom: 24px;
}

/* Table styling */
.table-custom {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--bs-bagel-border);
}

.table-custom th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--bs-bagel-border);
    padding: 12px 16px;
}

.table-custom td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.table-custom tr:hover td {
    background-color: #f8fafc;
}

/* Footer */
footer {
    margin-top: auto;
    background: #18181b;
    color: #a1a1aa;
    padding: 24px 0;
    font-size: 13px;
    border-top: 1px solid #27272a;
}
