/* ===========================================================================
   FoundationBridge Design System -- "Warm Orange & Glassmorphic Slate"
   Matching the exact typography, structure, and theme of Vidyasetu.
   =========================================================================== */

:root {
    /* Brand Ramp - Prayogbharti Warm Orange */
    --brand-50:   #FFF8F2;
    --brand-100:  #FFEFE0;
    --brand-200:  #FFDCBE;
    --brand-300:  #FDBF8B;
    --brand-400:  #FB9B4E;
    --brand-500:  #F97316;
    --brand-600:  #EA580C;
    --brand-700:  #C24E05;
    --brand-dark: #9A3412;
    --brand-glow: rgba(249, 115, 22, 0.22);
    --brand-subtle: #FFF7ED;

    /* Neutrals */
    --ink-primary:   #0F172A;
    --ink-secondary: #334155;
    --ink-muted:     #64748B;
    --line:          #E2E8F0;
    --line-strong:   #CBD5E1;
    --surface:       #FFFFFF;
    --canvas:        #F8FAFC;

    /* Module Accents */
    --civic-purple:  #8B5CF6;
    --civic-emerald: #10B981;
    --civic-cyan:    #06B6D4;
    --civic-amber:   #F59E0B;
    --civic-rose:    #F43F5E;
    --civic-blue:    #0284C7;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-card:   0 4px 20px -2px rgba(15, 23, 42, 0.06);
    --shadow-float:  0 20px 40px -10px rgba(15, 23, 42, 0.12);
    --shadow-brand:  0 10px 25px -5px rgba(249, 115, 22, 0.35);

    --sidebar-w: 270px;

    /* Bootstrap Overrides */
    --bs-primary: var(--brand-500);
    --bs-primary-rgb: 249, 115, 22;
    --bs-link-color: var(--brand-600);
    --bs-link-hover-color: var(--brand-700);
    --bs-body-color: var(--ink-primary);
    --bs-body-bg: var(--canvas);
    --bs-border-color: var(--line);
    --bs-focus-ring-color: rgba(249, 115, 22, 0.25);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--canvas);
    color: var(--ink-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.935rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font, .heading-font {
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.025em;
    font-weight: 700;
    color: var(--ink-primary);
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--brand-700);
}

/* ------------------------------------------------ Top Info Bar */
.top-info-bar {
    background: #0F172A;
    color: #94A3B8;
    font-size: 0.78rem;
    padding: 0.45rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-info-bar a {
    color: #E2E8F0;
}
.top-info-bar a:hover {
    color: #F97316;
}

/* ------------------------------------------------ Glassmorphic Navbar */
.navbar-crm {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.25s ease;
}

.brand-badge {
    background: #FFF7ED;
    color: #EA580C;
    border: 1px solid #FED7AA;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-brand-primary {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 12px;
    padding: 0.65rem 1.5rem;
    box-shadow: var(--shadow-brand);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-brand-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -5px rgba(249, 115, 22, 0.45);
    color: #FFFFFF !important;
}

.btn-brand-outline {
    background: #FFFFFF;
    color: #0F172A !important;
    border: 1.5px solid var(--line-strong);
    font-weight: 700;
    border-radius: 12px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s;
}
.btn-brand-outline:hover {
    border-color: var(--brand-500);
    color: var(--brand-600) !important;
    background: #FFF7ED;
}

/* ------------------------------------------------ App Layout & Sidebar */
.app-container {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-w);
    background: #FFFFFF;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1020;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #FFF8F2 0%, #FFFFFF 100%);
}

.sidebar-menu {
    padding: 1rem 0.85rem;
    flex: 1;
}

.sidebar-heading {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    padding: 0.75rem 0.75rem 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    color: var(--ink-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}
.sidebar-link:hover {
    background: #FFF7ED;
    color: var(--brand-600);
}
.sidebar-link.active {
    background: #FFF7ED;
    color: var(--brand-600);
    font-weight: 700;
    border: 1px solid #FED7AA;
}
.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar-app {
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-body {
    padding: 2rem 2.25rem;
    flex: 1;
}

/* ------------------------------------------------ Metric Cards */
.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s ease;
}
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: #FDBA74;
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* ------------------------------------------------ Visual Kanban Pipeline */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(290px, 1fr));
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
}

.kanban-column {
    background: #F1F5F9;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.kanban-header {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.kanban-deals {
    padding: 0.85rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.deal-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.15rem;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.deal-card:hover {
    transform: translateY(-3px);
    border-color: #F97316;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.2);
}

/* ------------------------------------------------ 80G Tax Exemption Certificate */
.certificate-80g {
    background: #FFFFFF;
    border: 3px double #C24E05;
    padding: 3rem;
    border-radius: 16px;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-float);
}
.cert-seal {
    width: 100px;
    height: 100px;
    border: 2px dashed #EA580C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #C24E05;
    text-transform: uppercase;
    transform: rotate(-12deg);
}

/* ------------------------------------------------ Badges & Pills */
.pill-badge {
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------------------------------ Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
