/* Precious Ayurveda ERP - Premium Orange & Dark Navy Stylesheet */

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

:root {
    /* Color Palette - Light Theme */
    --primary-color: #F97316; /* Primary Orange */
    --secondary-color: #FB923C; /* Secondary Orange */
    --accent-color: #F97316;
    --navy-dark: #0F172A; /* Dark Navy navigation text */
    --bg-color: #F8FAFC; /* Slate background */
    --sidebar-bg: #111827; /* Dark sidebar */
    --sidebar-hover: #1E293B;
    --sidebar-active: #F97316;
    --card-bg: #FFFFFF;
    --top-header-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    
    --success-color: #22C55E;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
    --shadow-lift: 0 20px 25px -5px rgba(249, 115, 22, 0.1), 0 8px 10px -6px rgba(249, 115, 22, 0.05);
    
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --border-radius: 18px; /* Redefined to 18px */
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
}

[data-theme="dark"] {
    /* Color Palette - Dark Theme */
    --bg-color: #0B0F19;
    --card-bg: #111827;
    --top-header-bg: #111827;
    --sidebar-bg: #030712;
    --sidebar-hover: #111827;
    --sidebar-active: #F97316;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --border-color: #1F2937;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--navy-dark);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, 
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary);
}

/* ========================================================
   CONTAINER & FLOATING SIDEBAR LAYOUT
   ======================================================== */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
}

/* Floating Sidebar Design - Modern Glassmorphism & High-end Dark Theme */
#sidebar {
    min-width: 270px;
    max-width: 270px;
    background: linear-gradient(135deg, #0B1528 0%, #1E293B 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: calc(100vh - 32px);
    margin: 16px;
    border-radius: var(--border-radius); /* 18px rounded */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sidebar.active {
    margin-left: -290px;
}

#sidebar .sidebar-header {
    padding: 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#sidebar .sidebar-profile {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

#sidebar .sidebar-profile:hover {
    background: rgba(255, 255, 255, 0.03);
}

#sidebar .sidebar-search {
    padding: 16px 24px 8px 24px;
}

#sidebar .sidebar-search .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-size: 0.8rem;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

#sidebar .sidebar-search .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

#sidebar .sidebar-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#sidebar ul.components {
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
}

/* Custom Scrollbar for Sidebar */
#sidebar ul.components::-webkit-scrollbar {
    width: 5px;
}
#sidebar ul.components::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar ul.components::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
#sidebar ul.components::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

#sidebar ul.components p {
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 16px 6px 16px;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

#sidebar ul.components li {
    margin-bottom: 4px;
}

#sidebar ul.components li a {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: none;
}

/* Modern Icon Container */
#sidebar ul.components li a i {
    margin-right: 12px;
    font-size: 0.95rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.7);
}

#sidebar ul.components li a:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #FFFFFF;
    transform: translateX(3px);
}

#sidebar ul.components li a:hover i {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
}

/* Sidebar Active states */
#sidebar ul.components li.active > a {
    background: rgba(249, 115, 22, 0.08);
    color: #FFFFFF;
    font-weight: 600;
}

#sidebar ul.components li.active > a i {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

/* Sidebar Submenus collapse container */
#sidebar ul.components li ul.collapse {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 6px 0;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

#sidebar ul.components li ul.collapse li a {
    padding: 8px 16px 8px 48px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

#sidebar ul.components li ul.collapse li a:hover {
    color: #FFFFFF;
    background: transparent;
    transform: translateX(3px);
}

#sidebar ul.components li ul.collapse li.active a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Content Holder Adjusted for Floating Sidebar */
#content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-color);
    margin-left: 302px; /* Fixed spacing alignment */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.active + #content {
    margin-left: 0;
}

@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -302px;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        margin-left: 0;
    }
    #sidebar.active + #content {
        margin-left: 0;
    }
}

/* Floating Sticky Blurred Header */
.navbar {
    position: sticky;
    top: 16px;
    margin: 16px 16px 0 16px;
    z-index: 990;
    padding: 14px 24px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius); /* 18px rounded */
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .navbar {
    background-color: rgba(17, 24, 39, 0.8);
}

.navbar .btn-toggle-sidebar {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Theme Switch and other nav actions */
.theme-toggle-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.2s, transform 0.2s;
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

/* ========================================================
   ENTERPRISE SOFT CARDS
   ======================================================== */

/* ========================================================
   ENTERPRISE SOFT CARDS - Sleek Border & Elegant Shadows
   ======================================================== */

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px; /* Modern extra-rounded corners */
    box-shadow: 0 4px 20px -2px rgba(17, 24, 39, 0.03), 0 2px 6px -1px rgba(17, 24, 39, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(17, 24, 39, 0.05), 0 10px 10px -5px rgba(17, 24, 39, 0.02);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(17, 24, 39, 0.05);
    padding: 20px 28px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

[data-theme="dark"] .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-body {
    padding: 28px;
}

/* Stat Card Icon Layout */
.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px -2px rgba(17, 24, 39, 0.05);
}

/* ========================================================
   MODERN FLOATING FORMS & ACCENTS
   ======================================================== */

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.82rem;
}

.form-control, .form-select {
    background-color: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px; /* Smoother cornering */
    padding: 12px 18px;
    font-size: 0.88rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus, .form-select:focus {
    background-color: var(--card-bg);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background-color: #0d121f;
    border-color: #1e293b;
}

/* Orange and Dark Outline Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 10px 24px;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-width: 1.5px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-pill {
    border-radius: 99px !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #ea580c;
    border-color: #ea580c;
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.btn-outline-secondary {
    color: var(--navy-dark);
    border-color: var(--border-color);
    background: transparent;
}

[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-primary);
    border-color: #1e293b;
}

.btn-outline-secondary:hover {
    background-color: rgba(17, 24, 39, 0.03);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Soft UI Badges */
.badge {
    padding: 6px 14px;
    font-weight: 600;
    border-radius: 99px;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

/* ========================================================
   TABLE SPECIFICATION
   ======================================================== */

.table {
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 700;
    color: var(--text-secondary);
    background-color: rgba(15, 23, 42, 0.01);
    border-bottom: 2px solid var(--border-color);
    padding: 18px 24px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

[data-theme="dark"] .table th {
    background-color: rgba(255, 255, 255, 0.005);
    border-bottom-color: #1e293b;
}

.table td {
    padding: 18px 24px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

[data-theme="dark"] .table td {
    border-bottom-color: #1e293b;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(249, 115, 22, 0.012) !important;
}

/* Pagination Links */
.pagination .page-link {
    border: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    margin: 0 4px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

/* ========================================================
   SLIDE-OUT DRAWERS AND SPLIT AUTH
   ======================================================== */

.slide-out-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 360px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -5px 0 35px rgba(15, 23, 42, 0.15);
    z-index: 1060;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

.slide-out-panel.active {
    right: 0;
}

.slide-out-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
}

.slide-out-overlay.active {
    display: block;
}

/* Fullscreen Split Login Background */
.split-login-container {
    min-height: 100vh;
    display: flex;
}

.login-side-illustration {
    flex: 1;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #F97316 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.login-side-form {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 40px;
    border-left: 1px solid var(--border-color);
}

.glass-auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--border-radius);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .glass-auth-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================================
   WORKSPACE SELECTOR CARDS
   ======================================================== */

.workspace-card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.workspace-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.workspace-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* ========================================================
   SKELETON & TIMELINE
   ======================================================== */

.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-color) 37%, var(--border-color) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
    display: inline-block;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.timeline-container {
    position: relative;
    padding-left: 36px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border-color);
}

.timeline-card-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-indicator {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3.5px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}
