/* ============================================================
   Big Travel Plan CRM — Design System
   Colors: Navy #1a1f36, Teal #0cc8aa, Light BG #f0f2f5
   Font: Inter (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --navy: #1a1f36;
    --navy-light: #252b48;
    --navy-hover: #2d3458;
    --teal: #0cc8aa;
    --teal-dark: #0aad94;
    --bg: #f0f2f5;
    --white: #ffffff;
    --text: #333;
    --text-muted: #6c757d;
    --border: #e2e6ea;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --sidebar-width: 250px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.crm-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--navy);
    padding: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.crm-sidebar .sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.crm-sidebar .sidebar-brand h4 {
    color: var(--teal);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    letter-spacing: -0.3px;
}

.crm-sidebar .sidebar-brand small {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crm-sidebar .sidebar-nav {
    flex: 1;
    padding: 16px 0;
    list-style: none;
    margin: 0;
}

.crm-sidebar .sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.crm-sidebar .sidebar-nav li a:hover {
    color: #fff;
    background: var(--navy-hover);
}

.crm-sidebar .sidebar-nav li a.active {
    color: var(--teal);
    background: rgba(12, 200, 170, 0.08);
    border-left-color: var(--teal);
}

.crm-sidebar .sidebar-nav li a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.crm-sidebar .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.crm-sidebar .sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.crm-sidebar .sidebar-footer a:hover {
    color: #ff6b6b;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.crm-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0;
}

.crm-topbar {
    background: var(--white);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-topbar .welcome-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.crm-topbar .welcome-text strong {
    color: var(--text);
}

.crm-topbar .user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.crm-topbar .user-badge i {
    color: var(--teal);
}

.crm-content {
    padding: 28px 32px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--navy);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--white);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: var(--radius);
    padding: 24px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.kpi-card .kpi-icon {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 2rem;
    opacity: 0.3;
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-card .kpi-label {
    font-size: 0.85rem;
    opacity: 0.85;
}

.kpi-teal     { background: linear-gradient(135deg, #0cc8aa, #0aad94); }
.kpi-green    { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.kpi-amber    { background: linear-gradient(135deg, #f39c12, #e67e22); }
.kpi-red      { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.kpi-blue     { background: linear-gradient(135deg, #3498db, #2980b9); }

/* ============================================================
   TABLES
   ============================================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    padding: 12px 16px;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
    background: rgba(12, 200, 170, 0.04);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-teal {
    background: var(--teal);
    border: none;
    color: var(--white);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-teal:hover {
    background: var(--teal-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 200, 170, 0.3);
}

.btn-outline-teal {
    border: 1.5px solid var(--teal);
    color: var(--teal);
    background: transparent;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-outline-teal:hover {
    background: var(--teal);
    color: var(--white);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-lead       { background: #3498db; color: #fff; }
.badge-quotation  { background: #f39c12; color: #fff; }
.badge-won        { background: #2ecc71; color: #fff; }
.badge-lost       { background: #e74c3c; color: #fff; }

.badge-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   KANBAN BOARD
   ============================================================ */
.kanban-column {
    min-width: 280px;
}

.kanban-column .kanban-header {
    padding: 14px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-header-lead      { background: #e8f4fd; color: #2980b9; }
.kanban-header-quotation { background: #fef5e7; color: #e67e22; }
.kanban-header-won       { background: #e8faf0; color: #27ae60; }
.kanban-header-lost      { background: #fdedec; color: #c0392b; }

.kanban-body {
    background: var(--bg);
    padding: 12px;
    border-radius: 0 0 var(--radius) var(--radius);
    min-height: 400px;
    border: 1px solid var(--border);
    border-top: none;
}

.kanban-card {
    background: var(--white);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}

.kanban-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.kanban-card .card-customer {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--navy);
}

.kanban-card .card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kanban-card .card-meta i {
    width: 16px;
    margin-right: 4px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(12, 200, 170, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--navy);
    margin-bottom: 6px;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

/* ============================================================
   LOGIN PAGE (standalone, no sidebar)
   ============================================================ */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--navy) 0%, #0a3d5c 50%, var(--teal) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    padding: 40px;
}

.login-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-left p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card h3 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.btn-google {
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-google:hover {
    background: var(--bg);
    border-color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .crm-sidebar {
        transform: translateX(-100%);
    }
    .crm-sidebar.show {
        transform: translateX(0);
    }
    .crm-main {
        margin-left: 0;
    }
    .login-wrapper {
        flex-direction: column;
    }
    .login-left {
        padding: 40px 20px;
        min-height: 200px;
    }
}
