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

:root {
    --background: #f8faf9;
    --foreground: #0f172a;
    --primary: #10b981;
    --primary-hover: #059669;
    --secondary: #ecfdf5;
    --secondary-foreground: #065f46;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #059669;
    --accent-foreground: #ffffff;
    --destructive: #ef4444;
    --border: #e2e8f0;
    --card: #ffffff;
    --navy: #0f172a;
    
    /* Bootstrap Theme Variables Overrides */
    --bs-primary: #10b981;
    --bs-primary-rgb: 16, 185, 129;
    --bs-link-color: #10b981;
    --bs-link-hover-color: #059669;
    --bs-link-color-rgb: 16, 185, 129;
    --bs-link-hover-color-rgb: 5, 150, 105;
    
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
    --radius-xl: 2.5rem;
    --radius-2xl: 3rem;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.6;
    background-image: radial-gradient(circle at center, rgba(16, 185, 129, 0.04) 0%, transparent 80%),
                      repeating-radial-gradient(circle at center, rgba(16, 185, 129, 0.01) 0px, rgba(16, 185, 129, 0.01) 1px, transparent 1px, transparent 45px);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -0.03em;
}

.font-headline {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 10px 40px -10px rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 20px 50px -10px rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
}

.glass-sidebar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(16, 185, 129, 0.08);
    height: 100vh;
    width: 18rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Base custom styles to match React layout precisely */
.btn-emerald {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 800;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.75rem;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease-in-out;
}

.btn-emerald:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 15px 25px -5px rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
}

.btn-emerald:active {
    transform: scale(0.98);
}

.btn-outline-emerald {
    border: 2px solid rgba(16, 185, 129, 0.2);
    background-color: transparent;
    color: var(--primary-hover);
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.75rem;
    transition: all 0.2s ease-in-out;
}

.btn-outline-emerald:hover {
    background-color: rgba(16, 185, 129, 0.05);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.card-custom {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(16, 185, 129, 0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
    background: #ffffff;
}

/* Custom stats cards */
.stat-card-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
}

.stat-card-emerald h3, .stat-card-emerald p, .stat-card-emerald span {
    color: white !important;
}

.stat-card-navy {
    background: #0f172a;
    color: white !important;
}

.stat-card-navy h3, .stat-card-navy p, .stat-card-navy span {
    color: white !important;
}

.stat-card-orange {
    background: #f97316;
    color: white !important;
}

.stat-card-orange h3, .stat-card-orange p, .stat-card-orange span {
    color: white !important;
}

/* Sidebar navigation links */
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    margin: 0.25rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #475569;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link i, .sidebar-link svg {
    margin-right: 1rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: rgba(16, 185, 129, 0.05);
    color: var(--primary-hover);
}

.sidebar-link:hover i, .sidebar-link:hover svg {
    color: var(--primary);
}

.sidebar-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px -5px rgba(16, 185, 129, 0.35);
}

.sidebar-link.active i, .sidebar-link.active svg {
    color: white;
}

/* Custom table layout */
.table-custom {
    margin-bottom: 0;
}

.table-custom thead th {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1rem;
}

.table-custom tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.02);
}

/* Badge styles */
.badge-custom {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45em 0.85em;
    border-radius: 50rem;
}

.badge-active {
    background-color: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-pending {
    background-color: rgba(249, 115, 22, 0.08);
    color: #9a3412;
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.badge-inactive {
    background-color: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Form input custom styles */
.form-control-custom {
    height: 3.5rem;
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    color: var(--navy) !important;
    padding-left: 1.25rem;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Custom styling for nav pills */
.nav-pills .nav-link {
    color: var(--slate-700) !important;
    background-color: transparent !important;
    transition: all 0.2s ease-in-out;
}

.nav-pills .nav-link.active {
    background-color: #ffffff !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Form switch and controls override to replace primary Bootstrap blue */
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.form-check-input:focus {
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}

.form-label-custom {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: #475569;
    margin-left: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Loader custom spinner */
.spinner-custom {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
    color: var(--primary);
}

/* Accordion custom styling */
.accordion-custom .accordion-item {
    border-radius: var(--radius-md) !important;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #ffffff;
}

.accordion-custom .accordion-button {
    font-weight: 700;
    color: #1e293b;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
}

.accordion-custom .accordion-button:not(.collapsed) {
    background-color: rgba(16, 185, 129, 0.02);
    color: var(--primary-hover);
    box-shadow: none;
}

.accordion-custom .accordion-button::after {
    background-size: 1rem;
}

/* Responsive bottom menu for mobile views */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background-color: #ffffff;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    transition: all 0.2s ease;
}

.mobile-nav-item i, .mobile-nav-item svg {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i, .mobile-nav-item.active svg {
    background-color: rgba(16, 185, 129, 0.08);
}

/* Force Emerald styling on default Bootstrap inputs and focus outlines */
.form-control:focus, .form-select:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}
.form-check-input:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}
.form-check-input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}

/* Helper to improve text legibility on top of wallpapers */
.text-shadow-hero {
    text-shadow: 0 4px 24px rgba(255, 255, 255, 0.95), 
                 0 2px 8px rgba(255, 255, 255, 0.9), 
                 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* Flexbox utilities alignment overrides */
.justify-center {
    justify-content: center !important;
}

/* Special styling for Services Cards to blend lighter with wallpapers */
.services-card {
    background: rgba(236, 253, 245, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.04);
    transition: all 0.3s ease;
}
.services-card:hover {
    background: rgba(236, 253, 245, 0.65);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

/* Emerald green color utility classes for Tailwind markup compatibility */
.bg-emerald {
    background-color: #10b981 !important;
}
.text-emerald {
    color: #10b981 !important;
}
.border-emerald {
    border-color: #10b981 !important;
}

/* Ensure headings inside text-white blocks display in white color rather than default navy */
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
    color: #ffffff !important;
}

/* Custom layout helper heights */
.min-vh-screen {
    min-height: 100vh !important;
}

/* Navbar styling & mobile menu backdrop */
.navbar {
    min-height: 5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98) !important;
        border-radius: var(--radius-md) !important;
        padding: 1.5rem !important;
        margin-top: 1rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid rgba(16, 185, 129, 0.1) !important;
    }
}

/* ─── Dashboard Layout ─────────────────────────────────────────────────────── */

/* Fixed topbar — sits above scrollable content, right of sidebar */
.dashboard-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 4.5rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 150;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

/* On desktop push topbar right of sidebar */
@media (min-width: 768px) {
    .dashboard-topbar {
        left: 18rem;
    }
}

/* Content area — always scrollable, offset from topbar */
.dashboard-content {
    padding-top: calc(4.5rem + 1.25rem) !important;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .dashboard-content {
        padding-left: 20rem !important;
    }
}
