/**
 * Yolopment ERP Brand CSS
 * Brand: Navy (#0D1B3E) + Royal Blue (#1A3ADB) + Sky Blue (#4A9FE8)
 * Tagline: Innovate · Automate · Grow
 */

/* ── Design Tokens ──────────────────────────────────────────────────────── */
:root {
    --yolo-dark:         #0D1B3E;
    --yolo-primary:      #1A3ADB;
    --yolo-primary-mid:  #2550E0;
    --yolo-primary-light:#4A9FE8;
    --yolo-accent:       #42B4F5;
    --yolo-gradient:     linear-gradient(135deg, #0D1B3E 0%, #1A3ADB 60%, #4A9FE8 100%);
    --yolo-gradient-btn: linear-gradient(135deg, #1A3ADB 0%, #4A9FE8 100%);
    --yolo-surface:      #F8FAFF;
    --yolo-border:       #E2E8F4;
    --yolo-text:         #0D1B3E;
    --yolo-muted:        #64748B;
    --yolo-success:      #16A34A;
    --yolo-warning:      #D97706;
    --yolo-danger:       #DC2626;
    --sidebar-width:     260px;
    --topbar-height:     56px;
}

/* ── Global ──────────────────────────────────────────────────────────────── */
* { font-family: 'Inter', sans-serif !important; }

body {
    background: var(--yolo-surface) !important;
    color: var(--yolo-text) !important;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.app-sidebar {
    background: var(--yolo-dark) !important;
    width: var(--sidebar-width) !important;
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 8px;
    margin: 1px 10px;
    padding: 8px 12px !important;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    transform: translateX(2px);
}

.app-sidebar .nav-link.active {
    background: var(--yolo-gradient-btn) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(26, 58, 219, 0.35);
}

.app-sidebar .nav-link.active .nav-icon,
.app-sidebar .nav-link:hover .nav-icon {
    color: #fff !important;
}

.app-sidebar .nav-link .nav-icon {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 10px;
    width: 18px;
    font-size: 1rem;
    transition: color 0.2s ease;
}

/* ── Top Navbar ──────────────────────────────────────────────────────────── */
.app-header {
    height: var(--topbar-height) !important;
    box-shadow: 0 1px 4px rgba(13, 27, 62, 0.08) !important;
}

/* ── KPI Cards ───────────────────────────────────────────────────────────── */
.yolo-kpi-card {
    border: 1px solid var(--yolo-border);
    border-radius: 14px;
    padding: 1.25rem;
    background: #fff;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.yolo-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--yolo-gradient-btn);
    border-radius: 4px 0 0 4px;
}

.yolo-kpi-card:hover {
    box-shadow: 0 8px 24px rgba(26, 58, 219, 0.12);
    transform: translateY(-2px);
    border-color: var(--yolo-primary-light);
}

.yolo-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--yolo-dark);
    line-height: 1;
}

.yolo-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--yolo-muted);
}

.yolo-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--yolo-gradient-btn);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 58, 219, 0.25);
}

.yolo-kpi-icon.success { background: linear-gradient(135deg, #16A34A, #22C55E); box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25); }
.yolo-kpi-icon.warning { background: linear-gradient(135deg, #D97706, #F59E0B); box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25); }
.yolo-kpi-icon.danger  { background: linear-gradient(135deg, #DC2626, #EF4444); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25); }
.yolo-kpi-icon.info    { background: linear-gradient(135deg, #0891B2, #22D3EE); box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25); }
.yolo-kpi-icon.purple  { background: linear-gradient(135deg, #7C3AED, #A78BFA); box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--yolo-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.06) !important;
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--yolo-border) !important;
    border-radius: 14px 14px 0 0 !important;
    padding: 1rem 1.25rem !important;
    font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--yolo-gradient-btn) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(26, 58, 219, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(26, 58, 219, 0.4) !important;
    filter: brightness(1.05) !important;
}

.btn-outline-primary {
    color: var(--yolo-primary) !important;
    border-color: var(--yolo-primary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.btn-outline-primary:hover {
    background: var(--yolo-primary) !important;
    color: #fff !important;
}

/* ── Badges / Status Pills ───────────────────────────────────────────────── */
.badge-status {
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-new         { background: #EFF6FF; color: #1D4ED8; }
.status-contacted   { background: #F0FDF4; color: #15803D; }
.status-follow_up   { background: #FFF7ED; color: #C2410C; }
.status-qualified   { background: #FAF5FF; color: #6D28D9; }
.status-won         { background: #F0FDF4; color: #15803D; }
.status-lost        { background: #FFF1F2; color: #BE123C; }
.status-active      { background: #F0FDF4; color: #15803D; }
.status-expiring    { background: #FFF7ED; color: #C2410C; }
.status-expired     { background: #FFF1F2; color: #BE123C; }
.status-paid        { background: #F0FDF4; color: #15803D; }
.status-unpaid      { background: #FFF1F2; color: #BE123C; }
.status-partial     { background: #FFF7ED; color: #C2410C; }
.status-overdue     { background: #FFF1F2; color: #BE123C; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table th {
    background: var(--yolo-surface) !important;
    color: var(--yolo-muted) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--yolo-border) !important;
    white-space: nowrap;
}

.table td { vertical-align: middle !important; }

.table-hover tbody tr:hover { background: var(--yolo-surface) !important; }

/* ── Form Controls ───────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--yolo-border) !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--yolo-primary-light) !important;
    box-shadow: 0 0 0 3px rgba(74, 159, 232, 0.15) !important;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--yolo-text);
    margin-bottom: 5px;
}

/* ── Pipeline Kanban ─────────────────────────────────────────────────────── */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.kanban-column {
    min-width: 260px;
    max-width: 260px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--yolo-border);
    display: flex;
    flex-direction: column;
}

.kanban-header {
    padding: 12px 14px;
    border-radius: 12px 12px 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--yolo-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-cards { padding: 10px; flex: 1; min-height: 200px; }

.kanban-card {
    background: #fff;
    border: 1px solid var(--yolo-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    border-color: var(--yolo-primary-light);
    box-shadow: 0 4px 12px rgba(26, 58, 219, 0.1);
    transform: translateY(-1px);
}

/* ── Notifications Icon ──────────────────────────────────────────────────── */
.yolo-notif-icon { background: #EFF6FF !important; }

/* ── Primary Light BG ────────────────────────────────────────────────────── */
.bg-primary-light { background: #EFF6FF !important; }
.text-primary { color: var(--yolo-primary) !important; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.app-content-header {
    border-bottom: 1px solid var(--yolo-border);
}

/* ── Micro animations ────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--yolo-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--yolo-primary-light); }

/* ── Login Page ──────────────────────────────────────────────────────────── */
.yolo-login-wrap {
    min-height: 100vh;
    background: var(--yolo-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.yolo-login-wrap::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    top: -150px; right: -150px;
}

.yolo-login-wrap::after {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    bottom: -100px; left: -100px;
}

.yolo-login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    z-index: 1;
}

/* ── Alert flash ─────────────────────────────────────────────────────────── */
.alert {
    border: none !important;
    border-radius: 10px !important;
}

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.dropdown-item { font-size: 0.875rem; padding: 0.45rem 1rem; transition: background 0.15s; }
.dropdown-item:hover { background: var(--yolo-surface); }

/* ── Premium Gradient KPI Cards ──────────────────────────────────────────── */
.yolo-kpi-card.gradient-card {
    border: none !important;
    color: #fff !important;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.yolo-kpi-card.gradient-card .yolo-kpi-label {
    color: rgba(255, 255, 255, 0.75) !important;
}

.yolo-kpi-card.gradient-card .yolo-kpi-value {
    color: #fff !important;
}

.yolo-kpi-card.gradient-card .yolo-kpi-icon {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    color: #fff !important;
}

.yolo-kpi-card.gradient-card::before {
    display: none !important;
}

.yolo-kpi-card.gradient-card .kpi-subtext {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 11px;
}

.yolo-kpi-card.gradient-card .kpi-subtext .text-success,
.yolo-kpi-card.gradient-card .kpi-subtext .text-warning,
.yolo-kpi-card.gradient-card .kpi-subtext .text-danger {
    color: #fff !important;
    font-weight: 600;
}

.gradient-card-1 { background: linear-gradient(135deg, #0f519f 0%, #1a3adb 100%) !important; }
.gradient-card-2 { background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%) !important; }
.gradient-card-3 { background: linear-gradient(135deg, #5b247a 0%, #1b004a 100%) !important; }
.gradient-card-4 { background: linear-gradient(135deg, #302b63 0%, #240b36 100%) !important; }
.gradient-card-5 { background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important; }
.gradient-card-6 { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important; }
.gradient-card-7 { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%) !important; }
.gradient-card-8 { background: linear-gradient(135deg, #373b44 0%, #4286f4 100%) !important; }

/* Pulse Animation for Active Timer Indicator */
.animate-pulse {
    animation: navPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes navPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

