@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --fsn-orange: #F97316;
    --fsn-green: #22C55E;
    --bg-color: #F9F8F6;
    --text-color: #2D2D2D;
    --sidebar-bg: #1A1C1E; /* Premium dark charcoal */
    --sidebar-text: #ffffff;
    --border-color: #E5E1DA;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-color); }
a { text-decoration: none; color: inherit; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #888; }
.text-danger { color: #ef4444; }
.brand-color { color: var(--fsn-orange); }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.bg-light { background-color: var(--bg-color); }

/* Layout */
.wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); color: var(--sidebar-text); transition: 0.3s; flex-shrink: 0; display: flex; flex-direction: column; padding: 32px 0; border-right: 1px solid rgba(255,255,255,0.05); }

.sidebar-header { padding: 0 24px 32px 24px; position: relative; }
.brand-name { color: var(--sidebar-text); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 4px; }
.brand-name span { color: var(--fsn-orange); }
.brand-subtitle { font-size: 12px; color: #888; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.close-sidebar { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; position: absolute; right: 16px; top: 0; }

.sidebar-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav li a { display: flex; align-items: center; padding: 14px 24px; color: #A0A0A0; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; border-left: 4px solid transparent; }
.sidebar-nav li a:hover, .sidebar-nav li a.active { color: #FFF; background: rgba(255,255,255,0.03); border-left: 4px solid var(--fsn-orange); }
.logout-item { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 24px;}
.logout-item a { color: #A0A0A0 !important; }
.logout-item a:hover { color: #ef4444 !important; }

.main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - 260px); }
.topbar { background: #FFF; min-height: 72px; padding: 12px 32px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; gap: 16px; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar-search { display: flex; align-items: center; gap: 8px; background: #F9F8F6; padding: 8px 14px; border-radius: 8px; border: 1px solid #E5E1DA;}
.topbar-search input { background: transparent; border: none; outline: none; font-size: 14px; font-family: inherit; width: 220px; color: var(--text-color); }
.topbar-search input::placeholder { color: #AAA; }
.topbar-btn-add { background: var(--fsn-orange); color: white; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: 0.2s; white-space: nowrap; }
.topbar-btn-add:hover { background: #ea580c; }

.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-color); }
.page-title { font-size: 16px; font-weight: 600; color: #111; display: flex; align-items: center; gap: 8px;}
.page-title-context { color: #888; font-weight: 400; font-size: 15px;}
.user-greeting { font-size: 14px; font-weight: 600; color: #111; text-align: right; line-height: 1.3;}
.user-greeting small { display: block; font-size: 12px; color: #888; font-weight: 400; }

.content-area { padding: 32px; flex: 1; overflow-y: auto; max-width: 1440px; margin: 0 auto; width: 100%; }

/* Bento Grid */
.row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 24px; }
.row > div { grid-column: span 12; display: flex; flex-direction: column; }

@media (min-width: 768px) {
    .col-md-2 { grid-column: span 2 !important; }
    .col-md-3 { grid-column: span 3 !important; }
    .col-md-4 { grid-column: span 4 !important; }
    .col-md-5 { grid-column: span 5 !important; }
    .col-md-6 { grid-column: span 6 !important; }
    .col-md-7 { grid-column: span 7 !important; }
    .col-md-8 { grid-column: span 8 !important; }
    .col-md-9 { grid-column: span 9 !important; }
    .col-md-10 { grid-column: span 10 !important; }
    .col-md-12 { grid-column: span 12 !important; }
}

@media (min-width: 1024px) {
    .col-lg-2 { grid-column: span 2 !important; }
    .col-lg-3 { grid-column: span 3 !important; }
    .col-lg-4 { grid-column: span 4 !important; }
    .col-lg-5 { grid-column: span 5 !important; }
    .col-lg-6 { grid-column: span 6 !important; }
    .col-lg-7 { grid-column: span 7 !important; }
    .col-lg-8 { grid-column: span 8 !important; }
    .col-lg-9 { grid-column: span 9 !important; }
    .col-lg-10 { grid-column: span 10 !important; }
    .col-lg-12 { grid-column: span 12 !important; }
}

/* Cards & Forms */
.card { background: #FFF; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--card-shadow); padding: 24px; display: flex; flex-direction: column; width: 100%; }
.card > h3 { font-size: 18px; font-weight: 700; color: #111; margin-bottom: 20px;}

.form-group { margin-bottom: 20px; width: 100%; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; color: #555; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid #D1D5DB; border-radius: 8px; font-family: inherit; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s; background: #FFF; }
.form-control:focus { outline: none; border-color: var(--fsn-orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.2s; gap: 8px; white-space: nowrap; }
.btn-primary { background-color: var(--fsn-orange); color: #fff; }
.btn-primary:hover { background-color: #ea580c; }
.btn-success { background-color: var(--fsn-green); color: #fff; }
.btn-success:hover { background-color: #16a34a; }
.btn-danger { background-color: #ef4444; color: #fff; }
.btn-danger:hover { background-color: #dc2626; }
.btn-secondary { background-color: #F1F1F1; color: #333; border: 1px solid #E5E1DA; }
.btn-secondary:hover { background-color: #E2E2E2; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px;}
.btn-block { display: flex; width: 100%; }

/* Login Page */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--sidebar-bg); }
.login-box { width: 100%; max-width: 420px; padding: 48px; border: none; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2); }

/* Tables */
.table-responsive { overflow-x: auto; flex: 1; border-radius: 10px; border: 1px solid var(--border-color); margin-top: 8px; background: #FFF; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 0; white-space: nowrap; }
.table th, .table td { padding: 16px 20px; text-align: left; vertical-align: middle;}
.table th { background-color: #FBFBFA; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #888; font-weight: 700; border-bottom: 1px solid #E5E1DA;}
.table td { border-bottom: 1px solid #F5F5F5; color: #333; }
.table-striped tbody tr:nth-of-type(odd) { background-color: #FAFAFA; }
.table tbody tr:hover { background-color: #F4F4F5; }

/* Badges */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; background-color: #F1F1F1; color: #666; white-space: nowrap; }
.badge-new { background-color: #F1F1F1; color: #666; }
.badge-interested { background-color: rgba(249, 115, 22, 0.1); color: var(--fsn-orange); }
.badge-converted, .badge-green { background-color: rgba(34, 197, 94, 0.1); color: var(--fsn-green); }
.badge-lost { background-color: #fee2e2; color: #ef4444; }

.alert { padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.alert-success { background-color: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0;}
.alert-danger { background-color: #fef2f2; color: #ef4444; border: 1px solid #fecaca;}

/* Dashboard stats */
.stat-card { padding: 24px; justify-content: flex-start; }
.stat-card h3 { font-size: 32px; margin: 8px 0; color: #111; font-weight: 700; letter-spacing: -0.02em;}
.stat-card p { color: #666; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0;}

/* Adjusts to align items in forms */
.align-items-end { align-items: flex-end; }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { position: fixed; left: -260px; height: 100%; z-index: 1000; box-shadow: 4px 0 24px rgba(0,0,0,0.15); }
    .sidebar.active { left: 0; }
    .close-sidebar { display: inline-block; }
    .mobile-toggle { display: inline-block; }
    .main-content { width: 100%; }
    .topbar { padding: 12px 20px; }
    .content-area { padding: 20px; }
}

@media (max-width: 767px) {
    .row { display: flex; flex-direction: column; }
    .topbar-right .user-greeting { display: none; }
    .topbar-right { gap: 12px; }
    .topbar-search input { width: 160px; }
}
@media (max-width: 480px) {
    .topbar-search { display: none; } /* Hide search on very small screens to save space */
}

