:root {
    --primary: #4da5c3;
    --primary-dark: #3a8ba8;
    --secondary: #1e293b;
    --accent: #4da5c3;
    --bg-main: #f1f5f9;
    --bg-side: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: rgba(77, 165, 195, 0.15);
    --glass: rgba(77, 165, 195, 0.05);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 0.75rem;
}

/* Filter Bar */
.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 1.5rem;
    align-items: flex-end;
}

.filter-grid .form-group {
    margin-bottom: 0 !important;
}

.form-select {
    width: 100%;
    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(77, 165, 195, 0.1);
}

.btn-action {
    transition: var(--transition);
}

.btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.admin-layout {
    background-color: var(--bg-main);
}

.auth-layout {
    background: radial-gradient(circle at top left, #0F172A, #0B0E14);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-side);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.sidebar-header img {
    height: 70px !important;
    width: auto;
    object-fit: contain;
}

.sidebar-header span {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.nav-menu {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 5px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.nav-category {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.4rem;
    transition: var(--transition);
    gap: 0.85rem;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-item i {
    width: 20px;
    font-size: 1.15rem;
    opacity: 0.8;
}

.nav-item:hover {
    background: rgba(77, 165, 195, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(77, 165, 195, 0.25);
}

.nav-item.active i {
    opacity: 1;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 4rem;
}

/* Header/Topnav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--accent);
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.glass-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: 0 10px 30px rgba(77, 165, 195, 0.05);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-blue {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

.icon-green {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.icon-purple {
    background: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

.icon-orange {
    background: rgba(249, 115, 22, 0.1);
    color: #F97316;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Sections */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Tables */
.premium-table {
    border-collapse: separate;
    border-spacing: 0 0.75rem;
    margin-top: -0.75rem;
}

.premium-table tr {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border-bottom: none;
    transition: var(--transition);
}

.premium-table td {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1rem;
}

.premium-table td:first-child {
    border-left: 1px solid var(--border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.premium-table td:last-child {
    border-right: 1px solid var(--border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.premium-table tr:hover {
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

table tr {
    border-bottom: 1px solid rgba(56, 189, 248, 0.05);
    transition: var(--transition);
}

table tr:hover {
    background: rgba(56, 189, 248, 0.03);
}

table tr:last-child {
    border-bottom: none;
}

td {
    padding: 1rem;
    font-size: 0.9rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #EAB308;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

/* Auth */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0% 0%, rgba(77, 165, 195, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.9) 0%, #0f172a 100%);
    background-color: #0f172a;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle mesh texture */
.auth-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234da5c3' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4v-4H4v4H0v2h4v4h2v-4h4v-2H6zM36 4v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.75rem;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    padding: 2.25rem 2.5rem;
    position: relative;
    z-index: 1;
    animation: authFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-bg {
    background: #ffffff;
    padding: 0.75rem;
    display: inline-flex;
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.auth-header img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.auth-header p {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 260px;
    margin: 0 auto;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-with-icon .form-control {
    padding-left: 3.25rem;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
}

.input-with-icon .form-control:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.input-with-icon .form-control:focus+i {
    color: var(--primary);
}

.auth-submit {
    height: 3.5rem;
    font-size: 1rem;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-extra {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.auth-extra p {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(77, 165, 195, 0.1);
}

.form-control.is-invalid {
    border-color: #EF4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23EF4444' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23EF4444' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #EF4444;
}

/* Premium Form Layouts */
.form-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.form-group.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.form-group.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
    accent-color: var(--primary);
}

.form-actions-bar {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Custom Select Styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
    padding-right: 2.5rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--primary);
    transform: translateX(-4px);
}


.btn-primary {
    background: var(--primary);
    color: var(--bg-side);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(77, 165, 195, 0.2);
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(77, 165, 195, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: auto;
}

.btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.1rem;
}

.btn-icon:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-icon.wa {
    background: #22c55e;
    color: white;
}

.btn-icon.ai {
    background: var(--secondary);
    color: white;
}

.btn-icon.reset {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-ghost:hover {
    background: #f8fafc;
    color: var(--secondary);
    border-color: var(--text-light);
}


/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 20px 0 80px rgba(15, 23, 42, 0.25);
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 5rem;
        /* Space for fixed mobile header */
    }

    .top-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
        padding: 0.85rem 1.25rem;
        z-index: 90;
        border-bottom: 1px solid rgba(77, 165, 195, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        margin-bottom: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--glass);
        color: var(--primary);
        border: 1px solid var(--border);
        border-radius: 12px;
        cursor: pointer;
        font-size: 1.25rem;
        transition: var(--transition);
    }

    .mobile-toggle:hover {
        background: var(--primary);
        color: white;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 95;
        display: none;
    }

    .overlay.active {
        display: block;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1.25rem;
        padding-top: 5.5rem;
    }

    .glass-card {
        padding: 1.5rem !important;
        border-radius: 24px;
    }

    .stats-grid {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        gap: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .page-title h1 {
        font-size: 1.35rem;
        letter-spacing: -0.02em;
    }

    .page-title p {
        font-size: 0.75rem;
    }

    .user-profile {
        display: none;
    }
}

/* Utils */
.mobile-toggle {
    display: none;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: #ef4444;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
}

.quick-add-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    border-radius: 6px;
    background: var(--glass);
    color: var(--primary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
}

.quick-add-btn:hover {
    background: var(--primary);
    color: white;
}

/* Mobile Specific Components */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .header-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .header-actions .form-control,
    .header-actions .btn {
        max-width: none !important;
        width: 100% !important;
    }

    /* Convert Table to Cards */
    .responsive-card-table {
        border: none !important;
    }

    .responsive-card-table thead {
        display: none;
    }

    .responsive-card-table tbody tr {
        display: block;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 20px;
        margin-bottom: 1.5rem;
        padding: 1.25rem;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
        position: relative;
        overflow: hidden;
    }

    .responsive-card-table tbody tr::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--primary);
    }

    .responsive-card-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.85rem 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    }

    .responsive-card-table td:last-child {
        border-bottom: none !important;
        margin-top: 0.75rem;
        padding-top: 1.25rem !important;
        background: rgba(77, 165, 195, 0.02);
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        font-weight: 800;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-muted);
        opacity: 0.8;
        display: block;
        margin-bottom: 4px;
    }

    /* Improved spacing for card content */
    .responsive-card-table td {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }

    .responsive-card-table td:last-child {
        background: rgba(77, 165, 195, 0.03);
        border-radius: 0 0 16px 16px;
        margin-top: 5px;
        justify-content: center !important;
        padding: 1.25rem !important;
    }
}

/* Global Form Responsiveness */
.form-row-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group-full {
        grid-column: 1 / -1;
    }

    .form-submit-btn {
        width: 100%;
        padding: 1.25rem !important;
    }

    .items-table th:nth-child(2),
    .items-table td:nth-child(2) {
        width: 120px !important;
    }
}

/* ==========================================================================
   Switch Toggle Styles (Scoped)
   ========================================================================== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #cbd5e1;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked+.slider {
    background-color: #22C55E;
}

.switch input:checked+.slider:before {
    transform: translateX(22px);
}

/* Print Utilities */
@media print {

    .no-print,
    .sidebar,
    .top-nav,
    .mobile-toggle,
    .btn-back,
    .page-actions,
    .nav-menu {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .app-container {
        display: block !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
}