/* === CSS VARIABLES === */
:root {
    --primary: #4361ee;
    --secondary: #4cc9f0;
    --success: #06ffa5;
    --warning: #eaca29;
    --danger: #ed2d4a;
    --dark: #0a0e27;
    --dark-light: #1a1f3a;
    --text: #e8eaf6;
    --text-muted: #cbd5e1;

    /* Neo-Glass Variables */
    --bg-glass: rgba(20, 24, 45, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    /* More subtle */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    /* Deeper shadow */
    --neon-glow: 0 0 15px rgba(67, 97, 238, 0.4);
    --radius-lg: 24px;
    --radius-sm: 16px;
    --floating-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top right, #1a1f3a 0%, #0a0e27 40%, #050714 100%);
    background-attachment: fixed;
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(67, 97, 238, 0.3);
    border-radius: 10px;
    border: none;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(67, 97, 238, 0.6);
}

/* === LAYOUT === */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: 280px;
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-glass);
}

.logo i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(67, 97, 238, 0.5));
    animation: pulse 3s ease-in-out infinite;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(67, 97, 238, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(67, 97, 238, 0.8));
    }
}

.nav-links {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 56px;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, calc(var(--primary) * 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover i {
    transform: scale(1.15);
    color: var(--secondary);
    text-shadow: 0 0 8px rgba(76, 201, 240, 0.6);
}

.nav-link.active {
    background: rgba(67, 97, 238, 0.15);
    border: 1px solid rgba(67, 97, 238, 0.3);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.15);
}

.nav-link.active i {
    color: var(--secondary);
}

.nav-link i {
    font-size: 1.5rem;
    width: 34px;
    text-align: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-link span {
    font-weight: 500;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 1rem;
    min-height: 100vh;
}

/* === MODULES === */
.module {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.module.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* === GLASS CARDS (NEO-GLASS) === */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.glass-card>* {
    position: relative;
    z-index: 1;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(67, 97, 238, 0.2);
}

.glass-card h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.glass-card h2 i {
    color: var(--primary);
    font-size: 1.2em;
    filter: drop-shadow(0 0 12px rgba(67, 97, 238, 0.5));
}

/* === DASHBOARD === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.stat-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-info .value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-icon {
    font-size: 3.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.stat-card:hover .stat-icon {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* === BUTTONS === */
.btn {
    padding: 0.85rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: var(--floating-shadow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn i {
    font-size: 1.2em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.6);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3651d4);
    color: white;
    box-shadow: 0 8px 20px -5px rgba(67, 97, 238, 0.6);
    border-color: rgba(67, 97, 238, 0.5);
}

.btn-primary:hover {
    box-shadow: 0 12px 25px -5px rgba(67, 97, 238, 0.8);
    border-color: var(--secondary);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #3ba3c7);
    color: white;
    box-shadow: 0 8px 20px -5px rgba(76, 201, 240, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #05d98a);
    color: var(--dark);
    box-shadow: 0 8px 20px -5px rgba(6, 255, 165, 0.6);
    text-shadow: none;
    font-weight: 700;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #e6c200);
    color: var(--dark);
    box-shadow: 0 8px 20px -5px rgba(234, 202, 41, 0.6);
    text-shadow: none;
    font-weight: 700;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #d61f6b);
    color: white;
    box-shadow: 0 8px 20px -5px rgba(247, 37, 133, 0.6);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #1da851);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
}

/* === FORMS === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    transition: color 0.3s;
}

.form-control {
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

.form-group:focus-within .form-label {
    color: var(--secondary);
    text-shadow: 0 0 8px rgba(76, 201, 240, 0.5);
}

.form-control:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.form-control:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-color: #000000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234cc9f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    color: #ffffff;
}

select.form-control option {
    background-color: #000000;
    color: #ffffff;
    padding: 0.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* === TABLES === */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(10, 14, 39, 0.4);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    border: 1px solid var(--border-glass);
    max-height: 600px;
    /* Limit height for sticky header utility */
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    /* Changed for border-radius on rows */
    border-spacing: 0;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(90deg, #1a1f3a, #252a4a);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.9rem;
    vertical-align: middle;
}

tbody tr {
    transition: all 0.2s ease;
    background: transparent;
}

tbody tr:hover {
    background: rgba(67, 97, 238, 0.08) !important;
    transform: scale(1.005);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
    position: relative;
}

/* Zebra striping for better readability */
tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.action-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* === BADGES === */
.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-scheduled {
    background: rgba(255, 214, 10, 0.15);
    color: #ffd60a;
    border: 1px solid rgba(255, 214, 10, 0.3);
}

.badge-confirmed {
    background: rgba(6, 255, 165, 0.15);
    color: #06ffa5;
    border: 1px solid rgba(6, 255, 165, 0.3);
}

.badge-canceled {
    background: rgba(247, 37, 133, 0.15);
    color: #f72585;
    border: 1px solid rgba(247, 37, 133, 0.3);
}

/* Invoice Status Badges */
.badge-paid {
    background: rgba(67, 97, 238, 0.15);
    color: #4cc9f0;
    border: 1px solid rgba(67, 97, 238, 0.3);
}

.badge-pending {
    background: rgba(234, 202, 41, 0.15);
    color: #eaca29;
    border: 1px solid rgba(234, 202, 41, 0.3);
}

/* === TABS === */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-glass);
}

.tab {
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* === SEARCH BAR === */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-bar .form-control {
    flex: 1;
    min-width: 200px;
}

/* === CHARTS === */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 5px solid;
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #fff;
}

.toast-message {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
}

.toast-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
}

@keyframes progress {
    to {
        transform: scaleX(0);
    }
}

.toast-success {
    border-color: #00b09b;
}

.toast-success .toast-icon {
    color: #00b09b;
}

.toast-success .toast-progress-bar {
    background: #00b09b;
}

.toast-error {
    border-color: #ff5f6d;
}

.toast-error .toast-icon {
    color: #ff5f6d;
}

.toast-error .toast-progress-bar {
    background: #ff5f6d;
}

.toast-warning {
    border-color: #f7b733;
}

.toast-warning .toast-icon {
    color: #f7b733;
}

.toast-warning .toast-progress-bar {
    background: #f7b733;
}

.toast-info {
    border-color: #4a00e0;
}

.toast-info .toast-icon {
    color: #4a00e0;
}

.toast-info .toast-progress-bar {
    background: #4a00e0;
}

/* === MODAL === */
#invoice-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* === QUICK ACTIONS === */
.quick-actions {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MOBILE MENU === */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glass);
}

.mobile-menu-toggle:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: scale(1.05);
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* === NOTIFICATIONS === */
.notification-container {
    position: relative;
    display: inline-block;
}

.notification-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    transition: color 0.3s;
}

.notification-btn:hover {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid var(--dark);
    display: none;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: var(--shadow-glass);
    display: none;
    z-index: 1000;
    overflow: hidden;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.notification-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: flex;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(67, 97, 238, 0.1);
}

.notification-list {
    overflow-y: auto;
    max-height: 300px;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    gap: 1rem;
    transition: background 0.2s;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(67, 97, 238, 0.05);
    border-left: 3px solid var(--primary);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info {
    background: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.notification-icon.success {
    background: rgba(6, 255, 165, 0.2);
    color: var(--success);
}

.notification-icon.warning {
    background: rgba(234, 202, 41, 0.2);
    color: var(--warning);
}

.notification-icon.error {
    background: rgba(237, 45, 74, 0.2);
    color: var(--danger);
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notification-actions-internal {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-actions-internal {
    opacity: 1;
}

.mark-read-btn-internal,
.delete-notif-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mark-read-btn-internal:hover {
    color: var(--success);
    background: rgba(6, 255, 165, 0.1);
}

.delete-notif-btn:hover {
    color: var(--danger);
    background: rgba(237, 45, 74, 0.1);
}

.notification-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-text:hover {
    transform: scale(1.1);
}

.badge-info {
    background: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.badge-success {
    background: rgba(6, 255, 165, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(234, 202, 41, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(237, 45, 74, 0.2);
    color: var(--danger);
}

/* History table status colors */
tr.unread {
    background: rgba(67, 97, 238, 0.03);
}

tr.unread td:nth-child(2) {
    font-weight: 600;
}

/* === RESPONSIVE TABLES === */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 800px;
    }
}

/* === TABLET RESPONSIVE === */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
        padding: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .glass-card {
        padding: 1.5rem;
    }

    .stat-info .value {
        font-size: 2rem;
    }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 100;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quick-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .quick-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        min-height: 44px;
        /* Touch target size */
    }

    .glass-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .glass-card h2 {
        font-size: 1.25rem;
    }

    /* Responsive tables - card layout */
    .table-container {
        background: transparent;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tbody tr {
        margin-bottom: 1rem;
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        padding: 1rem;
    }

    tbody tr:hover {
        transform: none;
    }

    td {
        border: none;
        position: relative;
        padding: 0.75rem 0.75rem 0.75rem 45%;
        text-align: right;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
    }

    .action-group {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .btn-sm {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }

    /* Search bar responsive */
    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-bar .form-control {
        width: 100%;
        min-width: auto;
    }

    .search-bar .btn {
        width: 100%;
    }

    /* Tabs responsive */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .tab {
        padding: 0.75rem 1.5rem;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    /* Stats cards */
    .stat-card {
        padding: 1rem;
    }

    .stat-info .value {
        font-size: 2rem;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    /* Forms */
    .form-control {
        font-size: 16px;
        /* Prevent zoom on iOS */
        padding: 1rem;
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
        padding: 1rem 1.5rem;
    }

    /* Toast notifications */
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Chart container */
    .chart-container {
        height: 250px;
    }
}

/* === SMALL MOBILE === */
@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }

    .glass-card {
        padding: 0.75rem;
    }

    .glass-card h2 {
        font-size: 1.1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .stat-info .value {
        font-size: 1.75rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }

    .form-control {
        padding: 0.875rem;
    }

    td {
        padding: 0.5rem 0.5rem 0.5rem 42%;
        font-size: 0.9rem;
    }

    td:before {
        font-size: 0.85rem;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        padding-top: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === PRINT STYLES === */
@media print {

    .sidebar,
    .mobile-menu-toggle,
    .sidebar-overlay,
    .toast-container,
    .btn,
    .action-group {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .glass-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }
}

/* === LOADING ANIMATION === */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, transparent, rgba(67, 97, 238, 0.1), transparent);
    background-size: 1000px 100%;
}

/* === LOADING OVERLAY === */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.3);
}

.loader-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === GENERIC MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content.confirm-modal {
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.warning-icon {
    font-size: 3rem;
    color: var(--warning);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(234, 202, 41, 0.4));
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* === STAGGERED ANIMATIONS === */
tbody tr {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generate staggered delay for first 20 items */
tbody tr:nth-child(1) {
    animation-delay: 0.05s;
}

tbody tr:nth-child(2) {
    animation-delay: 0.1s;
}

tbody tr:nth-child(3) {
    animation-delay: 0.15s;
}

tbody tr:nth-child(4) {
    animation-delay: 0.2s;
}

tbody tr:nth-child(5) {
    animation-delay: 0.25s;
}

tbody tr:nth-child(6) {
    animation-delay: 0.3s;
}

tbody tr:nth-child(7) {
    animation-delay: 0.35s;
}

tbody tr:nth-child(8) {
    animation-delay: 0.4s;
}

tbody tr:nth-child(9) {
    animation-delay: 0.45s;
}

tbody tr:nth-child(10) {
    animation-delay: 0.5s;
}

/* === ENHANCED INTERACTIVE ELEMENTS === */
.form-control:focus,
.btn:focus {
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.25);
    transform: translateY(-2px);
}

.nav-link.active {
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

/* === GLASMOPHISM ENHANCEMENTS === */
:root {
    --glass-highlight: rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: linear-gradient(145deg, rgba(26, 31, 58, 0.7), rgba(15, 23, 41, 0.7));
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-color: rgba(67, 97, 238, 0.2);
}

/* === LOADER ANIMATION === */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* === TABLE INTERACTIVITY === */
tbody tr {
    cursor: default;
}

tbody tr:hover {
    background: var(--glass-highlight) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

th {
    user-select: none;
    transition: background 0.2s;
}

th:hover {
    background: rgba(255, 255, 255, 0.05);
}

th i {
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* === RESPONSIVE TABLES (CARD VIEW) === */
@media (max-width: 768px) {
    .table-container {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-glass);
        margin-top: 1rem;
    }

    tbody tr:hover {
        transform: none;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        padding-bottom: 0.5rem;
        min-height: 2rem;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
    }

    td:last-child {
        padding-left: 0;
        justify-content: center;
        margin-top: 1rem;
        border-top: 1px solid var(--border-glass);
        padding-top: 1rem;
    }

    .action-group {
        justify-content: flex-end;
    }
}


/* === ANIMATIONS === */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(20deg);
    }

    20% {
        transform: rotate(-20deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-14deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(-10deg);
    }

    70% {
        transform: rotate(0deg);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    color: var(--primary) !important;
}

/* === INPUT ICONS FIX === */
input[type='date']::-webkit-calendar-picker-indicator,
input[type='time']::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* === LOGIN SCREEN === */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1729 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

.login-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 3rem;
    width: 90%;
    max-width: 450px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header i {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .btn {
    margin-top: 1rem;
}

/* === USER PROFILE IN SIDEBAR === */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.user-avatar i {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 8px rgba(67, 97, 238, 0.4));
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-info span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

.user-info small {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === LOGOUT BUTTON === */
.sidebar-footer {
    margin-top: 1.5rem;
}

.btn-logout {
    width: 100%;
    background: linear-gradient(135deg, rgba(237, 45, 74, 0.2), rgba(214, 31, 107, 0.2));
    color: var(--danger);
    border: 1px solid var(--danger);
    justify-content: center;
}

.btn-logout:hover {
    background: linear-gradient(135deg, var(--danger), #d61f6b);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 45, 74, 0.4);
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.modal-header h3 i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(67, 97, 238, 0.4));
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* === CASH REGISTER TOTALS === */
.cash-totals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.total-item:hover {
    background: rgba(67, 97, 238, 0.15);
    transform: translateX(5px);
}

.total-item span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.total-item span i {
    font-size: 1.25rem;
    color: var(--primary);
}

.total-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.total-item.grand-total {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(76, 201, 240, 0.1));
    border: 2px solid var(--primary);
    margin-top: 0.5rem;
}

.total-item.grand-total strong {
    font-size: 2rem;
}


/* === QUICK SERVICES STYLES === */
.quick-services-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.service-category-header {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-glass);
}

.service-category-header i {
    font-size: 1rem;
    color: var(--primary);
}

.service-category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}

.btn-service {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-service .service-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    display: block;
    line-height: 1.2;
}

.btn-service .service-price {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Service button color variants */
.btn-service-primary {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(67, 97, 238, 0.1));
    border: 1px solid rgba(67, 97, 238, 0.3);
    color: var(--text);
}

.btn-service-primary:hover {
    background: linear-gradient(135deg, var(--primary), #3651d4);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.btn-service-success {
    background: linear-gradient(135deg, rgba(6, 255, 165, 0.15), rgba(6, 255, 165, 0.05));
    border: 1px solid rgba(6, 255, 165, 0.3);
    color: var(--text);
}

.btn-service-success:hover {
    background: linear-gradient(135deg, var(--success), #05d98a);
    border-color: var(--success);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 255, 165, 0.4);
}

.btn-service-info {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.15), rgba(76, 201, 240, 0.05));
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: var(--text);
}

.btn-service-info:hover {
    background: linear-gradient(135deg, var(--secondary), #3ba3c7);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.4);
}

.btn-service-warning {
    background: linear-gradient(135deg, rgba(234, 202, 41, 0.15), rgba(234, 202, 41, 0.05));
    border: 1px solid rgba(234, 202, 41, 0.3);
    color: var(--text);
}

.btn-service-warning:hover {
    background: linear-gradient(135deg, var(--warning), #e6c200);
    border-color: var(--warning);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 202, 41, 0.4);
}

.btn-service-secondary {
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.1), rgba(203, 213, 225, 0.05));
    border: 1px solid rgba(203, 213, 225, 0.2);
    color: var(--text);
}

.btn-service-secondary:hover {
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.3), rgba(203, 213, 225, 0.2));
    border-color: rgba(203, 213, 225, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(203, 213, 225, 0.2);
}

/* Service added animation */
@keyframes serviceAdded {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.service-added {
    animation: serviceAdded 0.6s ease;
    box-shadow: 0 0 20px rgba(6, 255, 165, 0.6) !important;
}

/* Invoice item animation */
@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.invoice-item-new {
    animation: slideInFade 0.6s ease;
}

.invoice-item-new td {
    background: rgba(6, 255, 165, 0.1);
}

/* === MOBILE OPTIMIZATIONS (Batch 1) === */
@media (max-width: 768px) {
    /* Mobile Card View for Tables */
    /* Add class 'mobile-cards' to tables via JS or modify specific tables */
    #patients-table thead,
    #appointments-table thead {
        display: none;
    }

    #patients-table tbody,
    #patients-table tr,
    #appointments-table tbody,
    #appointments-table tr {
        display: block;
        width: 100%;
    }

    #patients-table tr,
    #appointments-table tr {
        background: rgba(255, 255, 255, 0.05);
        margin-bottom: 1rem;
        border-radius: 12px;
        padding: 1rem;
        position: relative;
    }

    #patients-table td,
    #appointments-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        text-align: right;
    }

    #patients-table td::before,
    #appointments-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
    }

    #patients-table td:last-child,
    #appointments-table td:last-child {
        margin-top: 1rem;
        justify-content: center;
        gap: 0.5rem;
    }

    /* Billing module responsive */
    #invoice-form>div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .service-category-buttons {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    }
}

/* === PRINT STYLES (Batch 2) === */
@media print {

    .sidebar,
    .mobile-menu-toggle,
    .fab-container,
    .toast-container,
    .btn,
    .tabs,
    .search-bar,
    .action-group {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .glass-card {
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        background: white;
        color: black;
    }

    body {
        background: white;
        color: black;
    }

    /* Format Tables for Print */
    table {
        border: 1px solid #ddd;
    }

    th {
        background: #f8f9fa;
        color: black;
        border-bottom: 2px solid #ddd;
    }

    td {
        border-bottom: 1px solid #ddd;
        color: black;
    }

    /* Invoice Specific */
    #invoice-form {
        display: block;
    }

    /* Hide form elements but show values? 
       Usually we print a specific "Invoice View", not the form.
       But if printing the list, this is fine.
       If printing the "New Invoice" form, it might look messy with inputs.
       Ideally, we print the "View Invoice" modal or a dedicated view.
    */
}

/* === SERVER STATUS PILL === */
.server-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    cursor: default;
    user-select: none;
    border: 1px solid transparent;
}

.server-status-pill.online {
    background: rgba(6, 255, 165, 0.1);
    color: #06ffa5;
    border-color: rgba(6, 255, 165, 0.25);
    box-shadow: 0 0 12px rgba(6, 255, 165, 0.15);
}

.server-status-pill.offline {
    background: rgba(237, 45, 74, 0.1);
    color: #ed2d4a;
    border-color: rgba(237, 45, 74, 0.3);
    box-shadow: 0 0 12px rgba(237, 45, 74, 0.2);
}

.server-status-pill.checking {
    background: rgba(234, 202, 41, 0.1);
    color: #eaca29;
    border-color: rgba(234, 202, 41, 0.25);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.server-status-pill.online .status-dot {
    animation: status-pulse-online 2s ease-in-out infinite;
}

.server-status-pill.offline .status-dot {
    animation: status-pulse-offline 1s ease-in-out infinite;
}

@keyframes status-pulse-online {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(6, 255, 165, 0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.15);
        box-shadow: 0 0 0 5px rgba(6, 255, 165, 0);
    }
}

@keyframes status-pulse-offline {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* === STAT COUNTER ANIMATION === */
.stat-value-animating {
    display: inline-block;
    animation: stat-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stat-pop {
    0% {
        transform: scale(0.7);
        opacity: 0.3;
    }

    70% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   LOGIN OVERLAY SCREEN
   ============================================ */

#login-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1a1f3a 0%, #0a0e27 40%, #050714 100%);
    animation: loginFadeIn 0.5s ease;
}

@keyframes loginFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#login-overlay.hide {
    animation: loginFadeOut 0.5s ease forwards;
}

@keyframes loginFadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.05); }
}

.login-card {
    background: rgba(20, 24, 45, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(67, 97, 238, 0.3);
    border-radius: 28px;
    padding: 3rem 3.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(67, 97, 238, 0.15);
    animation: loginCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #4361ee, #4cc9f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(67, 97, 238, 0.7));
    animation: pulse 3s ease-in-out infinite;
    display: block;
    margin-bottom: 0.75rem;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4361ee, #4cc9f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.login-logo p {
    color: #94a3b8;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.login-form-group {
    margin-bottom: 1.25rem;
}

.login-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    margin-left: 0.25rem;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(67, 97, 238, 0.4);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.login-input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.3);
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

.login-toggle-pw {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
}

.login-toggle-pw:hover { color: #4cc9f0; }

.login-error {
    background: rgba(237, 45, 74, 0.1);
    border: 1px solid rgba(237, 45, 74, 0.3);
    color: #ed2d4a;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: loginShake 0.4s ease;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-8px); }
    40%, 80%  { transform: translateX(8px); }
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4361ee, #3651d4);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(67, 97, 238, 0.7);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn.shaking {
    animation: loginShake 0.4s ease;
}