/* ==========================================================================
   Madhuram Recipe Costing - Central Admin Stylesheet (admin.css)
   Rule: Pure external CSS only. No inline (style="...") or internal (<style>)
         styles allowed in Blade views. High Bootstrap 5.3 integration.
   ========================================================================== */

:root {
    --bg-body: #f4f6fa;
    --sidebar-bg: #ffffff;
    --sidebar-width: 260px;
    --text-heading: #0f172a;
    --text-body: #475569;
    --text-muted: #94a3b8;
    --border-color: #eef2f6;
    --primary-accent: #0284c7;
    --primary-accent-hover: #0369a1;
    --active-item-bg: #eff3ff;
    --active-item-color: #3b66f5;
    --brand-navy: #0f2e5a;
    --brand-blue: #1e3a8a;
    --bs-body-font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-font-sans-serif: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body,
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.table,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   Sidebar Navigation Styles
   ========================================================================== */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    max-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-brand {
    padding: 1.4rem 1.25rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(15, 46, 90, 0.2);
}

.brand-title-wrap {
    line-height: 1.2;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-navy);
    letter-spacing: -0.01em;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: #d97706;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-content {
    padding: 1rem 0.85rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 5px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.9rem 0.75rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-section-title i {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    color: #556987;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: all 0.18s ease;
    margin-bottom: 10px;
}

.sidebar-link-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-link-content i {
    font-size: 14px;
    width: 22px;
    text-align: center;
    color: #64748b;
    transition: color 0.18s ease;
}

.sidebar-link:hover {
    background-color: #f8fafc;
    color: var(--text-heading);
}

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

.sidebar-link.active {
    background-color: var(--active-item-bg);
    color: var(--active-item-color);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--active-item-color);
}

.badge-counter {
    background-color: #10b981;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-role-text {
    font-size: 0.72rem;
}

/* ==========================================================================
   Content Layout & Topbar
   ========================================================================== */
#content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.topbar {
    height: 76px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.hamburger-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: #f8fafc;
    color: var(--text-heading);
}

.search-container {
    flex: 1;
    max-width: 520px;
    margin: 0 2rem;
}

.search-pill {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.25rem 0.35rem 0.25rem 1.15rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease;
}

.search-pill:focus-within {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.search-pill input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    color: #334155;
    background: transparent;
}

.search-pill input::placeholder {
    color: var(--text-muted);
}

.btn-search-pill {
    background: #0099cc;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 0.45rem 1.15rem;
    font-size: 0.825rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-search-pill:hover {
    background: var(--primary-accent);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-live-site {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-size: 0.825rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.45rem 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s;
}

.btn-live-site:hover {
    background: #ffe4e6;
    color: #be123c;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 9999px;
    transition: background 0.2s;
}

.user-profile-menu:hover {
    background: #f8fafc;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d9488;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.user-name-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-heading);
}

.dropdown-menu-custom {
    border-radius: 14px;
    min-width: 215px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 0.4rem 0;
}

.dropdown-menu-custom .dropdown-item {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-menu-custom .dropdown-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.dropdown-menu-custom .dropdown-item i {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.8;
}

.dropdown-menu-custom .dropdown-item-logout {
    font-size: 0.8rem;
    font-weight: 500;
    color: #ef4444;
    padding: 0.45rem 1rem;
}

.dropdown-menu-custom .dropdown-item-logout:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.dropdown-menu-custom .dropdown-item-logout i {
    font-size: 0.85rem;
    font-weight: 400;
    color: #ef4444;
    opacity: 0.85;
}

.page-body {
    padding: 1.75rem 2rem 2.5rem;
    flex: 1;
}

/* ==========================================================================
   Hero Welcome Section (Command Center)
   ========================================================================== */
.hero-card {
    background: radial-gradient(circle at 10% 20%, rgba(204, 251, 241, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(219, 234, 254, 0.45) 0%, transparent 40%),
        #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2rem 2.25rem 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.status-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #16a34a;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.hero-greeting {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-subtext {
    color: #64748b;
    font-size: 0.925rem;
    line-height: 1.5;
    max-width: 580px;
    margin-bottom: 1.5rem;
}

.hero-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.btn-hero:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #ffffff;
}

.btn-hero-green {
    background-color: #059669;
}

.btn-hero-green:hover {
    background-color: #047857;
}

.btn-hero-blue {
    background-color: #0284c7;
}

.btn-hero-blue:hover {
    background-color: #0369a1;
}

.btn-hero-purple {
    background-color: #6366f1;
}

.btn-hero-purple:hover {
    background-color: #4f46e5;
}

/* Right Widgets (Time & Activity Card) */
.time-status-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 0.45rem;
    white-space: nowrap !important;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.time-status-pill span,
.time-status-pill i,
.time-status-pill .badge-closed-tag {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
}

.badge-closed-tag {
    background-color: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.visitors-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    margin-top: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 320px;
}

.visitors-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.visitors-icon-square {
    width: 36px;
    height: 36px;
    background-color: #0284c7;
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.visitors-title {
    font-size: 0.95rem;
}

.traffic-indicator {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.traffic-indicator .dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
}

.visitors-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.visit-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.visit-val-total {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0284c7;
    line-height: 1;
}

.visit-box-today {
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.visit-val-today {
    font-size: 1.35rem;
    font-weight: 800;
    color: #16a34a;
    line-height: 1;
}

/* Stat Counter Strip */
.hero-stat-strip {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.stat-strip-item {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem;
    border-right: 1px solid #f1f5f9;
    white-space: nowrap;
}

.stat-strip-item:last-child {
    border-right: none;
}

.stat-strip-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1;
}

.stat-strip-number.highlight-blue {
    color: #0284c7;
}

.stat-strip-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

/* ==========================================================================
   Dashboard Analytics Cards (Line & Donut Charts)
   ========================================================================== */
.dashboard-panel-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.panel-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.icon-cyan-bg {
    background-color: #ecfeff;
    color: #06b6d4;
}

.icon-purple-bg {
    background-color: #faf5ff;
    color: #a855f7;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    white-space: nowrap;
}

.panel-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
}

/* Activity Range Filter Dropdown & Custom Date Range */
.btn-filter-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.785rem;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-filter-pill:hover,
.btn-filter-pill:focus,
.btn-filter-pill[aria-expanded="true"] {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-heading);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-filter-pill::after {
    margin-left: 0.35rem;
    vertical-align: 0.15em;
}

.custom-filter-dropdown {
    min-width: 285px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
    z-index: 1050;
}

.filter-preset-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-preset-list .dropdown-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}

.filter-preset-list .dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.filter-preset-list .dropdown-item.active {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
}

.custom-range-card {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 0.75rem;
}

.custom-range-title {
    font-size: 0.735rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.custom-date-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
    display: block;
}

.custom-date-input {
    font-size: 0.785rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-weight: 500;
}

.custom-date-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.btn-apply-custom-range {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    font-size: 0.785rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-apply-custom-range:hover {
    background-color: #0369a1;
    border-color: #0369a1;
    color: #ffffff;
}

.chart-activity-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-donut-container {
    position: relative;
    height: 190px;
}

/* Donut Chart Legend Breakdown */
.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.84rem;
}

.donut-legend-item:last-child {
    border-bottom: none;
}

.legend-bullet {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.bullet-emerald {
    background-color: #10b981;
}

.bullet-amber {
    background-color: #f59e0b;
}

.bullet-red {
    background-color: #ef4444;
}

.bullet-blue {
    background-color: #3b82f6;
}

/* Card Variations */
.card-warning-subtle-custom {
    background: #fffbeb;
    border: 1px solid #fef3c7;
}

/* ==========================================================================
   Bootstrap Component Overrides & Global Enhancements
   ========================================================================== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    background: #ffffff;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
}

.btn-primary {
    background: #0284c7;
    border-color: #0284c7;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #0369a1;
    border-color: #0369a1;
}

.btn-success {
    background: #059669;
    border-color: #059669;
    border-radius: 10px;
    font-weight: 600;
}

.btn-success:hover {
    background: #047857;
    border-color: #047857;
}

.table {
    vertical-align: middle;
    margin-bottom: 0;
}

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

.table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.badge-soft-success {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #b45309;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.badge-soft-primary {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.badge-soft-info {
    background-color: #e0f2fe;
    color: #0284c7;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.775rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid #bae6fd;
}

.badge-soft-secondary {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.775rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
/* ==========================================================================
   Desktop Sidebar Toggle / Collapse State
   ========================================================================== */
@media (min-width: 992px) {

    body.sidebar-collapsed #sidebar,
    #sidebar.collapsed {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    body.sidebar-collapsed #content-wrapper,
    #content-wrapper.expanded {
        margin-left: 0;
    }
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.25s ease;
}

@media (max-width: 991.98px) {
    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }

    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        z-index: 1045;
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    }

    #sidebar.show {
        margin-left: 0;
    }

    #content-wrapper {
        margin-left: 0;
    }

    .search-container {
        display: none;
    }

    .topbar {
        padding: 0 1rem;
    }

    .page-body {
        padding: 1.25rem 1rem;
    }

    .time-status-pill {
        align-self: flex-start;
        margin-bottom: 0.5rem;
    }

    .visitors-card {
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .hero-stat-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem 0.5rem;
        padding: 0.85rem 1rem;
    }

    .stat-strip-item {
        justify-content: flex-start;
        padding: 0.25rem 0.5rem;
    }

    .stat-strip-item:nth-child(2n) {
        border-right: none;
    }
}

@media (max-width: 575.98px) {
    .hero-stat-strip {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat-strip-item {
        border-right: none;
        padding: 0.25rem 0;
    }

    .hero-card {
        padding: 1.25rem 1rem;
    }

    .time-status-pill {
        flex-wrap: wrap;
        white-space: normal;
        border-radius: 12px;
    }
}


/* ==========================================================================
   Authentication & Login Page Styles (2-Part Split Layout)
   ========================================================================== */
.login-split-body {
    background-color: #ffffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.login-brand-side {
    background: linear-gradient(145deg, #07172c 0%, #0c2340 40%, #0369a1 100%);
    position: relative;
    overflow: hidden;
}

.login-brand-side::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 70%);
    pointer-events: none;
}

.login-split-logo-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    backdrop-filter: blur(8px);
}

.login-split-logo-icon-sm {
    width: 42px;
    height: 42px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.login-feature-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.login-form-side {
    background: #ffffff;
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

.login-quick-creds-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}


/* ==========================================================================
   Page Header Bar (Matching Reference Screenshot)
   ========================================================================== */
.page-header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.page-title-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.page-subtitle-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.35;
}

.page-title-compact {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.page-subtitle-compact {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.35;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.page-header-actions .btn-hero {
    padding: 0.42rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.btn-page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.18s ease;
}

.btn-page-back:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.btn-page-back i {
    font-size: 0.95rem;
    color: #64748b;
    transition: transform 0.18s ease;
}

.btn-page-back:hover i {
    color: #1e293b;
    transform: translateX(-2px);
}

.material-identity-banner {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.material-identity-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.material-identity-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .material-identity-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .material-identity-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }
}

.directory-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.02);
}

.filter-pill-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.05rem;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    background: #ffffff;
    transition: all 0.18s ease;
}

.filter-pill-item:hover {
    background: #f8fafc;
    color: var(--text-heading);
}

.filter-pill-item.active {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}

.filter-pill-badge {
    background: #0284c7;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.1rem 0.5rem;
    min-width: 18px;
    text-align: center;
}

.filter-pill-badge-muted {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.1rem 0.5rem;
}

.search-directory-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-directory-icon {
    position: absolute;
    left: 0.95rem;
    color: #94a3b8;
    pointer-events: none;
}

.search-directory-input {
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.45rem 1.25rem 0.45rem 2.4rem;
    font-size: 0.84rem;
    width: 320px;
    max-width: 100%;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
}

.search-directory-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.rate-pill-badge {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    font-size: 0.825rem;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.batches-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.batches-pill-badge:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.batches-pill-muted {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.action-btn-circle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.925rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
}

.action-btn-green {
    background: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

.action-btn-green:hover {
    background: #d1fae5;
    color: #047857;
}

.action-btn-blue {
    background: #eff6ff;
    color: #0284c7;
    border-color: #dbeafe;
}

.action-btn-blue:hover {
    background: #dbeafe;
    color: #0369a1;
}

.action-btn-red {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.action-btn-red:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.pagination-item-active {
    background: #0d9488 !important;
    color: #ffffff !important;
    border-color: #0d9488 !important;
}


/* ==========================================================================
   Refined Directory View (Pixel-Match with Patients Directory Screenshot)
   ========================================================================== */
.directory-card-container {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 20px;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.segmented-pill-container {
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.segmented-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    transition: all 0.18s ease;
    border: none;
    background: transparent;
}

.segmented-pill-btn:hover {
    color: #0f172a;
}

.segmented-pill-btn.active {
    background-color: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.segmented-pill-count {
    background-color: #0284c7;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.segmented-pill-count.muted {
    background-color: #e2e8f0;
    color: #475569;
}

.directory-search-input {
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 7px 18px 7px 38px;
    font-size: 0.835rem;
    width: 330px;
    max-width: 100%;
    outline: none;
    background-color: #ffffff;
    color: #334155;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.directory-search-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.directory-search-input::placeholder {
    color: #94a3b8;
}

.clean-directory-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.clean-directory-table thead th {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eef2f6 !important;
    color: #64748b;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 15px 5px;
    white-space: nowrap;
}

.clean-directory-table tbody td {
    padding: 10px 5px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.88rem;
}

.clean-directory-table tbody tr:hover td {
    background-color: #f8fafc;
}

.treatment-pill-box {
    display: inline-block;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.visits-pill-multi {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.visits-pill-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 9999px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
}

.icon-action-btn {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    padding: 0;
    line-height: 1;
}

.icon-action-green {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
}

.icon-action-green:hover {
    background-color: #d1fae5;
    color: #047857;
}

.icon-action-blue {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0284c7;
}

.icon-action-blue:hover {
    background-color: #dbeafe;
    color: #0369a1;
}

.icon-action-purple {
    background-color: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #7c3aed;
}

.icon-action-purple:hover {
    background-color: #ede9fe;
    color: #6d28d9;
}

.icon-action-teal {
    background-color: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #0d9488;
}

.icon-action-teal:hover {
    background-color: #ccfbf1;
    color: #0f766e;
}

.icon-action-amber {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.icon-action-amber:hover {
    background-color: #fef3c7;
    color: #b45309;
}

.icon-action-red {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.icon-action-red:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* ==========================================================================
   Scale Batch & Production Modal (New Premium Soft Lavender Design)
   ========================================================================== */
.scale-modal-dialog {
    max-width: 1140px;
    margin: 1.25rem auto;
}

.scale-modal-content {
    background: radial-gradient(circle at 100% 0%, rgba(221, 214, 254, 0.4) 0%, rgba(251, 250, 255, 0) 45%),
        radial-gradient(circle at 0% 100%, rgba(221, 214, 254, 0.35) 0%, rgba(251, 250, 255, 0) 45%),
        #faf9fd;
    border-radius: 24px;
    border: 1px solid rgba(221, 214, 254, 0.8);
    box-shadow: 0 25px 60px -15px rgba(99, 102, 241, 0.22), 0 0 0 1px rgba(221, 214, 254, 0.6);
    overflow: hidden;
    position: relative;
}

.scale-modal-body {
    padding: 0 1.75rem 1.5rem 1.75rem;
}

/* Header Section */
.scale-modal-header {
    background: transparent;
    border-bottom: none;
    padding: 1.4rem 1.75rem 0.5rem 1.75rem;
    position: relative;
}

.scale-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.35);
    margin-right: 0.5rem;
}

.scale-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e1b4b;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.scale-header-subtitle {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 1px;
    margin-bottom: 0;
}

.scale-close-btn {
    position: absolute;
    top: 1.15rem;
    right: 1.35rem;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease-in-out;
    padding: 0;
    cursor: pointer;
}

.scale-close-btn:hover {
    background-color: #f8fafc;
    color: #0f172a;
    transform: scale(1.05);
}

/* Base Parameters Ribbon (Under Title) */
.scale-base-ribbon {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    overflow: visible;
}

.scale-base-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.69rem;
    font-weight: 600;
    background-color: #ede9fe;
    color: #1e1b4b;
    border: 1px solid #ddd6fe;
    white-space: nowrap;
    flex-shrink: 0;
}

.scale-base-pill i {
    color: #7c3aed;
    font-size: 0.78rem;
}

.scale-base-pill strong {
    color: #1e1b4b;
    font-weight: 700;
}

/* 2-Cards Control Row */
.scale-controls-row {
    margin-top: 0;
}

.scale-panel-card {
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scale-panel-card-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.scale-panel-card-title i {
    font-size: 0.85rem;
}

.scale-multiplier-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6d28d9;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    border-radius: 9999px;
    padding: 0.15rem 0.45rem;
    line-height: 1;
}

/* Target Inputs */
.scale-target-inputs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
}

.scale-target-input {
    flex: 1 1 52%;
    width: 52%;
    min-width: 0;
    height: 36px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.25rem 0.45rem;
    color: #1e1b4b;
    background-color: #ffffff;
    transition: all 0.15s ease;
}

.scale-target-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 0.15rem rgba(124, 58, 237, 0.15);
    outline: none;
}

.scale-target-select {
    flex: 1 1 48%;
    width: 48%;
    min-width: 0;
    height: 36px;
    font-size: 0.84rem;
    font-weight: 700;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    color: #1e1b4b;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.scale-target-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 0.15rem rgba(124, 58, 237, 0.15);
    outline: none;
}

.scale-target-unit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 8px;
    background-color: #ede9fe;
    color: #5b21b6;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1.5px solid #ddd6fe;
    white-space: nowrap;
}

/* Total Summary Box */
.scale-summary-card {
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scale-summary-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.scale-summary-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.scale-summary-col {
    flex: 1;
    min-width: 0;
}

.scale-summary-divider {
    width: 1px;
    height: 30px;
    background-color: #c4b5fd;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.scale-summary-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: #4c1d95;
    line-height: 1.2;
    white-space: nowrap;
}

.scale-summary-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
}

/* Table Section with Tab Header */
.scale-table-wrapper {
    margin-top: 1rem;
}

.scale-tab-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0.45rem 1.35rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.25);
    position: relative;
    z-index: 2;
    margin-bottom: -1px;
}

.scale-table-card {
    background: #ffffff;
    border: 1px solid #e9e4f5;
    border-radius: 0 16px 16px 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.scale-table-scroll {
    max-height: 275px;
    overflow-y: auto;
}

.scale-ingredient-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.scale-ingredient-table th {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    background-color: #faf9fd;
    border-bottom: 1px solid #ede9fe;
    padding: 0.75rem 1.15rem;
    white-space: nowrap;
}

.scale-ingredient-table td {
    padding: 0.75rem 1.15rem;
    font-size: 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f5f3ff;
    color: #1e1b4b;
}

.scale-ingredient-table tr:last-child td {
    border-bottom: none;
}

.scale-ingredient-table tr:hover td {
    background-color: #faf8ff;
}

.scale-item-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    overflow: hidden;
}

.scale-item-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.scale-qty-pill {
    display: inline-block;
    padding: 0.32rem 0.95rem;
    border-radius: 9999px;
    background-color: #ede9fe;
    color: #5b21b6;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid #ddd6fe;
    white-space: nowrap;
}

/* Save / Footer Form */
.scale-footer-panel {
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 16px;
    padding: 0.85rem 1.35rem;
    margin-top: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.scale-footer-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.scale-footer-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.5rem 0.95rem;
    font-weight: 600;
    color: #1e1b4b;
    font-size: 0.86rem;
    transition: all 0.15s ease;
}

.scale-footer-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.15);
    outline: none;
}

.scale-btn-print {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 9999px;
    padding: 0.48rem 1.35rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: #1e1b4b;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.scale-btn-print:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.scale-btn-submit {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border: none;
    border-radius: 9999px;
    padding: 0.58rem 1.75rem;
    font-weight: 700;
    font-size: 0.86rem;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    transition: all 0.15s ease;
    cursor: pointer;
}

.scale-btn-submit:hover {
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
    color: #ffffff;
}

.custom-pagination-bar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-step-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    text-decoration: none;
}

.pagination-step-btn.enabled {
    color: #475569;
    cursor: pointer;
}

.pagination-step-btn.enabled:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.pagination-page-active {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #0d9488;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.address-text-truncate {
    max-width: 250px;
    display: inline-block;
}


/* ==========================================================================
   Raw Materials Specific Modern Utility Classes (admin.css)
   ========================================================================== */
.badge-storage-tag {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

.material-desc-truncate {
    max-width: 260px;
    font-size: 0.785rem;
    color: var(--text-muted);
}

.conversion-pill-container {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-family: monospace;
    color: #334155;
    line-height: 1.4;
    display: inline-block;
}

.base-cost-pill {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    color: #0284c7;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.825rem;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
}


/* ==========================================================================
   Form Styling Utilities (No Inline CSS)
   ========================================================================== */
.form-section-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-accent);
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.sticky-card-preview {
    position: sticky;
    top: 90px;
    border-color: #bae6fd;
}

.notes-truncate {
    max-width: 180px;
    display: inline-block;
    color: #64748b;
    font-size: 0.8rem;
}


.material-avatar-box {
    width: 56px;
    height: 56px;
}

.subtext-xs {
    font-size: 0.75rem;
}

/* ==========================================================================
   Raw Material Master Detail View Styles
   ========================================================================== */
.material-detail-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 1.5rem;
}

.material-cost-hero-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 1.25rem;
}

.material-cost-hero-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #059669;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0.35rem 0;
}

.material-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.84rem;
}

.material-metric-row:last-child {
    border-bottom: none;
}

.tier-cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.815rem;
    transition: background 0.15s ease;
}

.tier-cost-item:nth-child(odd) {
    background-color: #f8fafc;
}

.tier-cost-item:hover {
    background-color: #f1f5f9;
}

.usage-item-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.usage-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Material Header & Hero Stat Strip */
.material-stat-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 18px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.2s ease;
}

.material-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

.material-stat-label {
    font-size: 0.725rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.material-stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.material-stat-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Quick Interactive Calculator */
.quick-calc-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.quick-calc-input {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    background: #ffffff;
}

.quick-calc-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    outline: none;
}

.quick-calc-result-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.batch-code-pill {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.84rem;
    color: #0f172a;
    background: #f1f5f9;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

.cost-rate-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.825rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    display: inline-block;
}

.empty-state-box {
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 14px;
    padding: 2.25rem 1.5rem;
    text-align: center;
}


.supplier-badge-box {
    display: inline-block;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    max-width: 170px;
}

.notes-subtext {
    max-width: 150px;
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* Column width constraints for seamless non-wrapping table rows */
.col-min-material {
    min-width: 210px;
}

.col-min-pricing {
    min-width: 195px;
}

.col-min-dates {
    min-width: 200px;
}

.col-min-supplier {
    min-width: 155px;
}

.col-min-batches {
    min-width: 155px;
}

.col-min-actions {
    min-width: 95px;
}

#recipesTable .col-min-actions,
#preparationsTable .col-min-actions,
.clean-directory-table .col-min-actions {
    min-width: 215px;
}

/* ==========================================================================
   Single Recipe Import & Export Modal Styles
   ========================================================================== */
.recipe-data-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.recipe-data-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.recipe-data-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.recipe-data-card-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Add Material Modal Styles (No Inline/Internal CSS)
   ========================================================================== */
.custom-modal-content {
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.custom-modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    padding: 1.25rem 1.75rem;
}

.custom-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.custom-modal-body {
    padding: 1.75rem;
}

.custom-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #eef2f6;
    padding: 1rem 1.75rem;
}

.modal-input-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.modal-read-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    color: #1e293b;
    font-size: 0.925rem;
    min-height: 42px;
    display: flex;
    align-items: center;
}

/* Modal Calculator & Breakdown Table Styles */
.modal-calculator-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-calc-input {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    border-color: #cbd5e1;
}

.modal-calc-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.modal-calc-preset {
    cursor: pointer;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
    font-weight: 600;
    transition: all 0.15s ease;
}

.modal-calc-preset:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.modal-calc-result-banner {
    background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.06);
}

.modal-calc-amount {
    font-size: 1.85rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.modal-breakdown-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-breakdown-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-rate-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-rate-table td {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.modal-rate-table tbody tr:last-child td {
    border-bottom: none;
}

.modal-rate-table tbody tr:hover td {
    background: #f8fafc;
}

.modal-rate-table tbody tr.tier-highlight td {
    background: #f0fdf4;
    font-weight: 700;
}

/* ==========================================================================
   DataTables Global Custom Styling (Matching Madhuram Dashboard Theme)
   ========================================================================== */
.dataTables_wrapper {
    padding: 0.25rem 0;
}

.dataTables_wrapper .dataTables_length label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.35rem 2rem 0.35rem 0.85rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: #334155;
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dataTables_filter label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.4rem 1.15rem;
    font-size: 0.84rem;
    outline: none;
    background-color: #ffffff;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    width: 250px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.825rem;
    color: #64748b;
    font-weight: 500;
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.75rem;
    text-align: right;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 4px;
    margin: 0;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .page-link {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0;
    font-size: 0.825rem;
    font-weight: 600;
    color: #475569;
    padding: 0.4rem 0.75rem;
    line-height: 1.2;
    transition: all 0.18s ease;
    background-color: #ffffff;
}

.dataTables_wrapper .dataTables_paginate .page-link:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    color: #cbd5e1 !important;
    background-color: #ffffff !important;
    border-color: #f1f5f9 !important;
}

table.dataTable thead th {
    position: relative;
    cursor: pointer;
    user-select: none;
}

table.dataTable thead .sorting:hover,
table.dataTable thead .sorting_asc:hover,
table.dataTable thead .sorting_desc:hover {
    background-color: #f1f5f9 !important;
}

table.dataTable thead th.no-sort {
    cursor: default !important;
    background-image: none !important;
}

.table-scroll-250 {
    max-height: 250px;
    overflow-y: auto;
}

.subtext-xxs {
    font-size: 0.725rem;
}

.badge-xs {
    font-size: 0.7rem;
}

.w-col-32 {
    width: 32%;
}

.w-col-35 {
    width: 35%;
}

.w-col-12 {
    width: 12%;
}

/* ==========================================================================
   Mise-en-Place Preparations Table & Cost Badges
   ========================================================================== */
.prep-item-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prep-row-item {
    display: flex;
    align-items: center;
    min-height: 28px;
    line-height: 1.35;
}

.prep-item-dot {
    width: 6px;
    height: 6px;
    background-color: #0d9488;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.prep-qty-pill {
    background-color: #f1f5f9;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

.prep-cost-badge {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.prep-cost-badge strong {
    font-weight: 700;
    color: #047857;
    margin-left: 2px;
}

/* Ingredient Count Pill with Hover Tooltip */
.prep-ingredient-pill {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.prep-ingredient-pill:hover {
    background-color: #dcfce7;
    border-color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(22, 101, 52, 0.12);
}

.prep-ingredient-pill i {
    font-size: 0.9rem;
    color: #15803d;
}

/* Custom Tooltip Styling */
.tooltip-inner {
    max-width: 340px;
    text-align: left;
    padding: 0.65rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.55;
    border-radius: 10px;
    background-color: #0f172a;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

/* View Modal Metric Cards */
.modal-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.modal-metric-label {
    font-size: 0.725rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.modal-metric-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

/* ==========================================================================
   Create & Edit Mise-en-Place Preparation Form Styles
   ========================================================================== */
.prep-form-container {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.prep-summary-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.w-col-action {
    width: 60px;
}

/* ==========================================================================
   Compact Recipe Form & Table Styling (Edit & Create Pages)
   ========================================================================== */
.compact-recipe-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.compact-table-head th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.compact-recipe-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.compact-recipe-table tbody tr:hover td {
    background: #fafbfd;
}

.badge-type-raw {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    display: inline-block;
}

.badge-type-mise {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    display: inline-block;
}

.btn-icon-delete {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid #fee2e2;
    background: #fff5f5;
    color: #ef4444;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.btn-icon-delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.compact-summary-strip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
}

.compact-summary-stat {
    display: flex;
    flex-direction: column;
}

.compact-summary-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.compact-summary-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.col-item-type {
    width: 95px;
}

.col-item-rate {
    width: 120px;
}

.col-item-qty {
    width: 200px;
}

.col-item-cost {
    width: 110px;
}

.col-item-action {
    width: 48px;
}

/* ==========================================================================
   Modern SaaS Recipe Builder Styling
   ========================================================================== */
.modern-builder-card {
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.modern-builder-header {
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    border-radius: 17px 17px 0 0;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-table th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9edf3;
}

.modern-table td {
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.modern-table tbody tr:hover td {
    background: #fafbfd;
}

.badge-item-raw {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-item-mise {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.modern-input {
    border-color: #cbd5e1;
    border-radius: 10px;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    min-height: 40px;
}

.modern-input:focus {
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgb(2 132 199 / 0%);
}

.modern-rate-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.25rem 0.55rem;
    font-size: 0.825rem;
    color: #475569;
    display: inline-block;
    white-space: nowrap;
}

.modern-cost-pill {
    font-size: 1.05rem;
    font-weight: 800;
    color: #059669;
}

.modern-delete-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid #fee2e2;
    background: #fff5f5;
    color: #ef4444;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.modern-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.05);
}

.modern-cost-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.modern-stat-chip {
    padding: 0.1rem 0.25rem;
}

.modern-stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.modern-stat-val-cost {
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.1;
    white-space: nowrap;
}

.modern-stat-val-unit {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0284c7;
    line-height: 1.1;
    white-space: nowrap;
}

/* ==========================================================================
   Table Row Numbering & Serial Column Styles (No Inline/Internal CSS)
   ========================================================================== */
.col-min-num {
    width: 48px;
    min-width: 48px;
    max-width: 60px;
}

.col-item-num {
    width: 42px;
    min-width: 42px;
    max-width: 50px;
    text-align: center;
}

.row-num-badge {
    color: #64748b;
    font-weight: 600;
    font-size: 15px;
}

/* ==========================================================================
   Website Settings & Branding Assets (No Inline/Internal CSS)
   ========================================================================== */
.settings-asset-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s ease;
}

.settings-asset-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.settings-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 110px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.settings-preview-img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

.settings-icon-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.sidebar-brand.has-custom-logo {
    justify-content: center;
    padding: 9px 20px;
}

.sidebar-brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar-custom-logo {
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.sidebar-brand:hover .sidebar-custom-logo {
    transform: scale(1.03);
}

.sidebar-brand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.brand-logo-custom {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.login-brand-img {
    max-height: 72px;
    max-width: 240px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.login-split-logo-custom {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   User Profile & Security Page (No Inline/Internal CSS)
   ========================================================================== */
.user-avatar-circle-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.profile-badge-pill {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   User Profile & Security Page (No Inline/Internal CSS)
   ========================================================================== */
.user-avatar-circle-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.profile-badge-pill {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.password-toggle-btn {
    border-left: 0;
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.password-toggle-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* ==========================================================================
   Raw Materials Directory - Material Thumbnail & Icon Styles
   ========================================================================== */
.material-item-thumb {
    width: 15%;
}


.material-item-thumb-preview {
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.material-item-thumb-lg {
    width: 52px;
    height: 52px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.material-item-thumb-img {
    width: 50%;
}

.material-upload-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.material-upload-box:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.material-upload-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
}

.material-icon-chip {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    padding: 0;
}

.material-icon-chip:hover {
    background-color: #ede9fe;
    border-color: #c4b5fd;
    transform: scale(1.15);
}

.material-icon-chip.active {
    background-color: #ddd6fe;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
}

.material-preset-chips {
    max-height: 85px;
    overflow-y: auto;
    padding: 2px;
}

/* ==========================================================================
   Builder Table Scroll & Sticky Header (Dish Components & Prep Ingredients)
   ========================================================================== */
.builder-table-scroll {
    max-height: 440px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    position: relative;
}

.builder-table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.builder-table-scroll::-webkit-scrollbar-track {
    background: #f8fafc;
}

.builder-table-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

.builder-table-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.builder-table-scroll table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 5;
    box-shadow: inset 0 -1px 0 #e2e8f0;
}

.col-item-select {
    min-width: 260px;
}

/* ==========================================================================
   Select2 Bootstrap 5 Enhancements (Searchable Dropdown in Tables & Modals)
   ========================================================================== */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.18);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #1e293b;
    font-weight: 500;
    padding-left: 0;
    padding-right: 1.5rem;
    line-height: 1.5;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    z-index: 1065;
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-search--dropdown {
    padding: 0.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    background: #ffffff;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
}

.select2-container--bootstrap-5 .select2-results__options {
    max-height: 240px;
    padding: 4px;
}

.select2-container--bootstrap-5 .select2-results__option {
    font-size: 0.84rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 2px;
    color: #334155;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #2563eb;
    color: #ffffff;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

/* ==========================================================================
   Header Action Buttons (Export, Import) & Import Modals
   ========================================================================== */
.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.16s ease-in-out;
    cursor: pointer;
    line-height: 1.4;
}

.btn-header-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.btn-header-action i {
    font-size: 0.9rem;
}

.import-guide-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.import-column-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    color: #475569;
    font-weight: 600;
    margin: 2px 2px;
}

/* ==========================================================================
   User Profile Image & Avatar Styling
   ========================================================================== */
.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-avatar-img-lg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-upload-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-upload-btn-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.avatar-upload-btn-overlay:hover {
    background: #0369a1;
    transform: scale(1.12);
}

.cursor-pointer {
    cursor: pointer;
}