/* ==========================================================================
   Janki Piles Clinic — Modern Premium Medical Design System v3.0
   Inspired by Apollo Hospitals, Practo, Medanta & Webflow Design Principles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Brand Medical Colors */
    --primary: #059669;
    --primary-hover: #047857;
    --primary-dark: #065f46;
    --primary-light: #ecfdf5;
    --primary-glow: rgba(5, 150, 105, 0.2);

    /* Secondary & Dark Slate Tones */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;

    /* Accent & Status Colors */
    --accent-blue: #2563eb;
    --accent-blue-light: #eff6ff;
    --warning-amber: #f59e0b;
    --warning-light: #fffbeb;
    --danger-rose: #e11d48;
    --danger-light: #ffe4e6;
    --success-emerald: #10b981;

    /* Theme Layout Tokens */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --sidebar-active: #059669;
    --border-color: #e2e8f0;

    /* Elevation & Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.16), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 8px 25px rgba(5, 150, 105, 0.25);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Motion & Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE & TYPOGRAPHY
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--slate-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Focus Ring Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}


.nav-link {
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   3. GLASSMORPHISM & CARD COMPONENTS
   -------------------------------------------------------------------------- */
.glass-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(5, 150, 105, 0.3);
}

.medical-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.medical-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(5, 150, 105, 0.4);
}

/* --- Premium Treatment Cards --- */
.treatment-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: #ffffff !important;
    border-radius: var(--radius-lg) !important;
}

.treatment-card-top-accent {
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #059669, #10b981, #065f46);
    transition: width 0.35s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.treatment-card:hover .treatment-card-top-accent {
    width: 100%;
}

.treatment-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 35px -10px rgba(5, 150, 105, 0.16), 0 8px 15px -5px rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
}

.treatment-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--radius-md);
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.treatment-card:hover .treatment-icon-box {
    background-color: #059669 !important;
    color: #ffffff !important;
    transform: scale(1.08);
}

.dashboard-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Footer Link Utilities */
.footer-link {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: #10b981 !important;
    transform: translateX(4px);
}

.hover-emerald:hover {
    color: #10b981 !important;
}

.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-emerald {
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.btn-emerald:hover,
.btn-emerald:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-slate {
    background-color: var(--slate-800);
    color: #ffffff;
    border: 1px solid var(--slate-800);
}

.btn-slate:hover {
    background-color: var(--slate-900);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-rounded {
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   5. ADMIN & CONSOLE LAYOUT
   -------------------------------------------------------------------------- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 270px;
    min-width: 270px;
    background: var(--bg-sidebar);
    color: #f1f5f9;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #047857);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.sidebar-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
}

.sidebar-brand-name span {
    color: var(--primary);
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.25rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.875rem;
    margin-bottom: 0.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    opacity: 0.85;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #ffffff;
    background: var(--sidebar-active);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

}

/* Sidebar Accordion Dropdown Styles */


/* --------------------------------------------------------------------------
   6. TABLES & DATA LISTS
   -------------------------------------------------------------------------- */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.table-custom th {
    background-color: #f8fafc;
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--slate-700);
    font-size: 0.9rem;
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr {
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* --------------------------------------------------------------------------
   7. BADGES & CHIPS
   -------------------------------------------------------------------------- */
.badge-emerald {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
}

.badge-amber {
    background-color: var(--warning-light);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
}

.badge-rose {
    background-color: var(--danger-light);
    color: #9f1239;
    border: 1px solid rgba(225, 29, 72, 0.2);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   8. FORMS & INPUT CONTROLS
   -------------------------------------------------------------------------- */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--slate-800);
    background-color: #ffffff;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   9. ANIMATIONS & KEYFRAMES
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s var(--ease-out) forwards;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
    }
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        bottom: 0;
        box-shadow: var(--shadow-xl);
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .admin-content {
        padding: 1.25rem;
    }
}