/* ============================================================
   Sakura — Sistema de Gestión Empresarial Multi-Tenant
   Stylesheet Principal
   ============================================================ */

/* ---------- CSS Custom Properties (Theming) ---------- */
:root {
    /* Colores base — pueden ser sobreescritos por tenant */
    --primary-color: #E91E63;
    --primary-light: #F48FB1;
    --primary-dark: #C2185B;
    --secondary-color: #9C27B0;
    --secondary-light: #CE93D8;
    --secondary-dark: #7B1FA2;

    /* Neutrales */
    --bg-color: #f5f6fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #1a1a2e;
    --bg-sidebar-hover: #16213e;
    --bg-sidebar-active: #0f3460;

    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --text-white: #ffffff;
    --text-sidebar: #dfe6e9;

    --border-color: #dfe6e9;
    --border-light: #f0f0f0;

    /* Estado */
    --success: #00b894;
    --success-light: #e6f9f3;
    --warning: #fdcb6e;
    --warning-light: #fef9e7;
    --danger: #e17055;
    --danger-light: #fdecea;
    --info: #74b9ff;
    --info-light: #e8f4fd;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Bordes */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;

    /* Topbar */
    --topbar-height: 64px;

    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Dark Mode ---------- */
body.dark-mode {
    --bg-color: #1a1a2e;
    --bg-white: #16213e;
    --bg-card: #16213e;
    --bg-sidebar: #0f0f1a;
    --bg-sidebar-hover: #1a1a2e;
    --bg-sidebar-active: #16213e;

    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c80;

    --border-color: #2a2a40;
    --border-light: #252538;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

    --success-light: #0a2e20;
    --warning-light: #2e2a10;
    --danger-light: #2e1510;
    --info-light: #101a2e;
}

body.dark-mode .topbar {
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

body.dark-mode .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .table thead th {
    background: var(--bg-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

body.dark-mode .table tbody td {
    border-color: var(--border-color);
}

body.dark-mode .modal {
    background: var(--bg-card);
}

body.dark-mode .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .stat-card {
    background: var(--bg-card);
}

body.dark-mode .alert {
    border-color: var(--border-color);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    color-scheme: dark;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ---------- Layout: App Shell ---------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.app-main.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 64px;
}

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: white;
}

.sidebar-brand .brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-user-info {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-label {
    padding: 12px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-item {
    margin: 2px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-sidebar);
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
    padding-left: 20px;
}

.nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-link:hover i {
    transform: scale(1.12);
}

.nav-text {
    flex: 1;
}

.nav-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-white);
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.topbar-toggle:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.topbar-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    animation: notificationBounce 2s ease-in-out infinite;
}

/* ---------- Page Content ---------- */
.page-content {
    padding: 24px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.5rem;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    font-size: 0.7rem;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3,
.card-header h4 {
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- Stats Cards (KPIs) ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.stat-card-link:hover {
    border-color: var(--primary-color);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: rgba(233, 30, 99, 0.1); color: var(--primary-color); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: #e67e22; }
.stat-icon.danger  { background: var(--danger-light); color: var(--danger); }
.stat-icon.info    { background: var(--info-light); color: #0984e3; }
.stat-icon.secondary { background: rgba(156, 39, 176, 0.1); color: var(--secondary-color); }

.stat-info h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info .stat-change {
    font-size: 0.78rem;
    margin-top: 2px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #00a381;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d35400;
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(233, 30, 99, 0.04);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
}

.btn-icon.btn-sm {
    min-width: 30px;
    min-height: 30px;
    padding: 6px;
}

.btn-block {
    width: 100%;
}

.btn[disabled],
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    transform: translateY(-1px);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(225, 112, 85, 0.15);
}

.form-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 4px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23636e72'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.form-check label {
    cursor: pointer;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    gap: 16px;
}

.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- Tables ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(233, 30, 99, 0.03);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table .actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

/* ---------- Badges & Tags ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary { background: rgba(233, 30, 99, 0.1); color: var(--primary-color); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #e67e22; }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-info    { background: var(--info-light); color: #0984e3; }
.badge-secondary { background: #edf2f7; color: var(--text-secondary); }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.alert-success {
    background: var(--success-light);
    color: #0d7a5f;
    border-color: rgba(0, 184, 148, 0.2);
}

.alert-error,
.alert-danger {
    background: var(--danger-light);
    color: #c0392b;
    border-color: rgba(225, 112, 85, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: #856404;
    border-color: rgba(253, 203, 110, 0.3);
}

.alert-info {
    background: var(--info-light);
    color: #0c5460;
    border-color: rgba(116, 185, 255, 0.2);
}

.alert .alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0 4px;
}

.alert .alert-close:hover {
    opacity: 1;
}

/* ---------- Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-lg { max-width: 700px; }
.modal-xl { max-width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Dropdown ---------- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    padding: 6px 0;
    z-index: 1100;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
    transform-origin: top right;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 0;
}

.tab-link {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab-link:hover {
    color: var(--primary-color);
    background: rgba(233, 30, 99, 0.04);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(233, 30, 99, 0.04);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* ---------- Search & Filters ---------- */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input .form-control {
    padding-left: 40px;
}

/* ---------- Avatar ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    background: var(--primary-color);
    overflow: hidden;
}

.avatar-sm { width: 30px; height: 30px; font-size: 0.7rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Tooltip ---------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--text-primary);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 999;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ---------- Loading Spinner ---------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

/* ---------- Auth Pages ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 32px 32px 0;
}

.auth-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-header .brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.auth-header .brand-name {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-body {
    padding: 32px;
}

.auth-footer {
    text-align: center;
    padding: 0 32px 32px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Auth card wider for registration */
.auth-card.auth-card-wide {
    max-width: 620px;
}

/* ---------- Business Type Selector (Registration) ---------- */
.business-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.business-type-option {
    cursor: pointer;
    display: block;
}

.business-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.business-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 8px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: var(--bg-white);
    min-height: 100px;
    justify-content: center;
    gap: 6px;
}

.business-type-card i {
    font-size: 1.4rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.business-type-card .business-type-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.business-type-card .business-type-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.2;
    display: block;
}

.business-type-option:hover .business-type-card {
    border-color: var(--primary-light);
    background: var(--bg-color);
}

.business-type-option.selected .business-type-card,
.business-type-option input:checked + .business-type-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.04), rgba(156, 39, 176, 0.04));
    box-shadow: 0 0 0 1px var(--primary-color);
}

.business-type-option.selected .business-type-card i,
.business-type-option input:checked + .business-type-card i {
    color: var(--primary-color);
}

@media (max-width: 576px) {
    .business-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .auth-card.auth-card-wide {
        max-width: 100%;
    }
}

/* ---------- Login Page — Premium Design ---------- */
.login-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #0a0a1a;
}

/* --- Animated background layers --- */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 90%, rgba(233,30,99,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(156,39,176,0.15) 0%, transparent 50%),
        radial-gradient(ellipse 70% 70% at 50% 50%, rgba(15,52,96,0.3) 0%, transparent 70%),
        linear-gradient(160deg, #0a0a1a 0%, #12122a 30%, #1a1a3e 60%, #0f0f2a 100%);
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
}

.login-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: orbFloat 20s ease-in-out infinite;
}
.login-loaded .login-orbs .orb {
    opacity: 1;
}

.orb-1 {
    width: 400px; height: 400px;
    background: rgba(233,30,99,0.12);
    top: -10%; left: -5%;
    animation-delay: 0s;
}
.orb-2 {
    width: 350px; height: 350px;
    background: rgba(156,39,176,0.1);
    bottom: -10%; right: -5%;
    animation-delay: -5s;
}
.orb-3 {
    width: 250px; height: 250px;
    background: rgba(103,126,234,0.1);
    top: 40%; left: 45%;
    animation-delay: -10s;
}
.orb-4 {
    width: 200px; height: 200px;
    background: rgba(233,30,99,0.08);
    top: 20%; right: 20%;
    animation-delay: -15s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(30px, -40px) scale(1.1); }
    50%  { transform: translate(-20px, 20px) scale(0.95); }
    75%  { transform: translate(15px, 30px) scale(1.05); }
}

#particleCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Split layout wrapper --- */
.login-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}

/* --- Left branding panel --- */
.login-panel-left {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
    max-width: 640px;
}

/* Decorative glow behind left panel */
.login-panel-left::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233,30,99,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-brand-content {
    max-width: 440px;
    margin: 0 auto;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-loaded .login-brand-content {
    opacity: 1;
    transform: translateX(0);
}

/* Hero badge */
.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(233,30,99,0.1);
    border: 1px solid rgba(233,30,99,0.2);
    border-radius: 20px;
    color: #E91E63;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}
.login-hero-badge i {
    font-size: 0.75rem;
}

/* Pulsing logo */
.login-logo-pulse {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 28px;
}

.logo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(233,30,99,0.15);
    animation: logoRingPulse 3s ease-out infinite;
}
.ring-2 { animation-delay: 1s; }
.ring-3 { animation-delay: 2s; }

@keyframes logoRingPulse {
    0%   { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

.logo-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 50%, #9C27B0 100%);
    border-radius: 50%;
    font-size: 1.8rem;
    color: #fff;
    box-shadow:
        0 8px 32px rgba(233,30,99,0.35),
        0 0 60px rgba(156,39,176,0.15),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Brand text */
.login-brand-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #fff 0%, #E91E63 60%, #9C27B0 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: brandShimmer 6s ease-in-out infinite;
    line-height: 1.1;
    margin-bottom: 4px;
}
@keyframes brandShimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.login-brand-tagline {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.login-brand-subtitle {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 360px;
}

/* Feature cards */
.login-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0s);
    cursor: default;
}
.login-loaded .login-feature {
    opacity: 1;
    transform: translateY(0);
}
.login-feature:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(233,30,99,0.15);
    transform: translateX(6px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(233,30,99,0.15), rgba(233,30,99,0.05));
    color: #E91E63;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.login-feature:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(233,30,99,0.2);
}

.feature-icon.icon-blue {
    background: linear-gradient(135deg, rgba(66,165,245,0.15), rgba(66,165,245,0.05));
    color: #42a5f5;
}
.feature-icon.icon-green {
    background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(76,175,80,0.05));
    color: #66bb6a;
}
.feature-icon.icon-purple {
    background: linear-gradient(135deg, rgba(156,39,176,0.15), rgba(156,39,176,0.05));
    color: #ab47bc;
}

.feature-text strong {
    display: block;
    color: rgba(255,255,255,0.92);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.feature-text span {
    display: block;
    color: rgba(255,255,255,0.38);
    font-size: 0.78rem;
    line-height: 1.35;
}

/* Stats bar */
.login-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 24px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
.login-loaded .login-stats-bar {
    opacity: 1;
    transform: translateY(0);
}
.login-stat {
    flex: 1;
    text-align: center;
}
.login-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: -0.5px;
}
.login-stat-star {
    font-size: 0.65rem;
    color: #fbbf24;
    margin-left: 2px;
    vertical-align: middle;
}
.login-stat-label {
    display: block;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.login-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.08);
    margin: 0 4px;
}

/* Testimonial */
.login-testimonial {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s;
}
.login-loaded .login-testimonial {
    opacity: 1;
    transform: translateY(0);
}
.testimonial-quote {
    position: relative;
    padding-left: 0;
}
.testimonial-quote > .fas {
    color: rgba(233,30,99,0.3);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: block;
}
.testimonial-quote p {
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    line-height: 1.55;
    font-style: italic;
    margin: 0;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.testimonial-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.testimonial-info {
    flex: 1;
}
.testimonial-info strong {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 600;
}
.testimonial-info span {
    display: block;
    color: rgba(255,255,255,0.35);
    font-size: 0.72rem;
}
.testimonial-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 0.6rem;
}

.login-panel-footer {
    margin-top: auto;
    padding-top: 24px;
    color: rgba(255,255,255,0.18);
    font-size: 0.72rem;
}

/* --- Right form panel --- */
.login-panel-right {
    flex: 1 1 50%;
    max-width: 580px;
    min-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
}

.login-panel-right::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(233,30,99,0.2), rgba(156,39,176,0.2), transparent);
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.login-loaded .login-form-container {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile logo (hidden on desktop) */
.login-mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.login-mobile-logo .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.login-mobile-logo .brand-name {
    font-size: 1.4rem; font-weight: 700; color: #fff;
}

/* Form header */
.login-form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.2;
}
.login-form-header p {
    color: rgba(255,255,255,0.45);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* Glassmorphism form fields */
.login-field {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 4px 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
}
.login-field:focus-within {
    border-color: rgba(233,30,99,0.5);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(233,30,99,0.1), 0 0 20px rgba(233,30,99,0.05);
}

.login-field-icon {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.95rem;
    transition: color 0.3s;
}
.login-field:focus-within .login-field-icon {
    color: #E91E63;
}

.login-field-input {
    flex: 1;
    padding: 8px 0;
}
.login-field-input label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
}
.login-field-input input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 2px 0;
}
.login-field-input input::placeholder {
    color: rgba(255,255,255,0.2);
}
.login-field-input input:-webkit-autofill,
.login-field-input input:-webkit-autofill:hover,
.login-field-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(10,10,26,0.99) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.login-field-toggle {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 8px;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.login-field-toggle:hover {
    color: rgba(255,255,255,0.6);
}

/* Options row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 0.85rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    user-select: none;
}
.login-remember input {
    display: none;
}
.login-remember .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.login-remember .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}
.login-remember input:checked + .checkmark {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    border-color: transparent;
}
.login-remember input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.login-forgot {
    color: rgba(233,30,99,0.7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.login-forgot:hover {
    color: #E91E63;
}

/* Submit button */
.login-submit {
    width: 100%;
    padding: 16px 28px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(233,30,99,0.3);
}
.login-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233,30,99,0.4);
}
.login-submit:hover::before {
    opacity: 1;
}
.login-submit:active {
    transform: translateY(0);
}
.login-submit .btn-arrow {
    transition: transform 0.3s;
}
.login-submit:hover .btn-arrow {
    transform: translateX(4px);
}
.login-submit .btn-loader {
    display: none;
}
.login-submit.loading .btn-text,
.login-submit.loading .btn-arrow {
    display: none;
}
.login-submit.loading .btn-loader {
    display: inline;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}
.login-divider span {
    padding: 0 16px;
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Register CTA */
.login-register-cta {
    text-align: center;
}
.login-register-cta p {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.login-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.login-register-btn:hover {
    border-color: rgba(233,30,99,0.3);
    background: rgba(233,30,99,0.08);
    color: #E91E63;
    transform: translateY(-2px);
}

/* Alert overrides for dark login background */
.login-page .alert {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 12px;
    margin-bottom: 20px;
}
.login-page .alert-danger,
.login-page .alert.alert-danger {
    background: rgba(225,112,85,0.12);
    border-color: rgba(225,112,85,0.25);
    color: #ff8a75;
}
.login-page .alert-success,
.login-page .alert.alert-success {
    background: rgba(0,184,148,0.12);
    border-color: rgba(0,184,148,0.25);
    color: #6fe8cd;
}

/* --- Login responsive --- */
@media (max-width: 1200px) {
    .login-wrapper { max-width: 100%; }
    .login-panel-left { padding: 36px 40px; }
    .login-panel-right { padding: 36px 40px; min-width: 380px; }
    .login-brand-title { font-size: 2.2rem; }
    .login-stats-bar { padding: 12px 16px; }
    .login-stat-value { font-size: 0.95rem; }
}

@media (max-width: 960px) {
    .login-panel-left { flex: 0 1 45%; padding: 32px; }
    .login-panel-right { flex: 1 1 55%; min-width: 360px; }
    .login-features { gap: 8px; }
    .login-feature { padding: 10px 14px; }
    .login-brand-subtitle { display: none; }
    .login-testimonial { display: none; }
    .login-stats-bar { flex-wrap: wrap; gap: 8px; }
    .login-stat-divider { display: none; }
}

@media (max-width: 768px) {
    .login-wrapper { flex-direction: column; max-width: 100%; }
    .login-panel-left { display: none; }
    .login-panel-right {
        flex: 1;
        max-width: 100%;
        min-width: 0;
        min-height: 100vh;
        padding: 24px;
    }
    .login-panel-right::before { display: none; }
    .login-mobile-logo { display: flex; }
    .login-form-header h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .login-panel-right { padding: 20px 16px; }
    .login-form-container { max-width: 100%; }
    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ---------- Calendar (FullCalendar overrides) ---------- */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.fc .fc-button-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-size: 0.85rem;
    padding: 6px 14px;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(233, 30, 99, 0.04);
}

.fc .fc-event {
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: 0.78rem;
    border: none;
}

.fc .fc-timegrid-slot {
    height: 48px;
}

/* ---------- Charts ---------- */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100%;
}

/* ---------- Notifications Dropdown ---------- */
.notifications-dropdown {
    min-width: 340px;
    max-height: 420px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--bg-color);
}

.notification-item.unread {
    background: rgba(233, 30, 99, 0.03);
}

.notification-item.unread::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

@keyframes notificationBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* ---------- Page Load Animations ---------- */
.animate-in {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade {
    animation: fadeIn 0.4s ease both;
}

.animate-scale {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Staggered animation delays for grids */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    font-size: 0.875rem;
    pointer-events: all;
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

.toast.toast-removing {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: progressBar linear both;
}

.toast-success .toast-icon { color: var(--success); }
.toast-success .toast-progress { background: var(--success); }

.toast-error .toast-icon { color: var(--danger); }
.toast-error .toast-progress { background: var(--danger); }

.toast-warning .toast-icon { color: #e67e22; }
.toast-warning .toast-progress { background: var(--warning); }

.toast-info .toast-icon { color: #0984e3; }
.toast-info .toast-progress { background: var(--info); }

/* ---------- Confirm Dialog (Custom) ---------- */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.confirm-overlay.show {
    display: flex;
}

.confirm-dialog {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    overflow: hidden;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 28px auto 16px;
}

.confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.confirm-icon.warning {
    background: var(--warning-light);
    color: #e67e22;
}

.confirm-icon.info {
    background: var(--info-light);
    color: #0984e3;
}

.confirm-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0 24px;
}

.confirm-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0 24px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px 24px;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 110px;
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-color) 25%, #e8e8e8 50%, var(--bg-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.shorter { width: 40%; }

.skeleton-title {
    height: 22px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-md);
}

.skeleton-stat {
    height: 90px;
    border-radius: var(--radius-md);
}

/* ---------- Button Loading State ---------- */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-outline.is-loading::after,
.btn-ghost.is-loading::after {
    border-color: rgba(0,0,0,0.15);
    border-top-color: var(--primary-color);
}

/* ---------- Scroll-to-Top ---------- */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ---------- Empty State Enhanced ---------- */
.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

/* ---------- Ripple Effect ---------- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ---------- Focus Visible ---------- */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.tab-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ---------- Hover Card Accent ---------- */
.card-hover-accent {
    border-top: 3px solid transparent;
    transition: var(--transition);
}

.card-hover-accent:hover {
    border-top-color: var(--primary-color);
}

/* ---------- Status Indicator ---------- */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(0,184,148,0.2); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.busy { background: var(--danger); box-shadow: 0 0 0 3px rgba(225,112,85,0.2); }
.status-dot.away { background: var(--warning); box-shadow: 0 0 0 3px rgba(253,203,110,0.2); }

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #e67e22; }
.text-primary { color: var(--primary-color); }

.fw-bold { font-weight: 600; }
.fw-normal { font-weight: 400; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-100 { width: 100%; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Grid Layout ---------- */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Row/Col Layout ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}

.row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0 !important;
    }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .form-row.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .form-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: 1fr;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .search-bar {
        flex-direction: column;
    }

    .topbar-title {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        border-radius: var(--radius-md);
    }

    .auth-header, .auth-body, .auth-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .toast {
        min-width: 0;
    }

    .confirm-dialog {
        margin: 0 12px;
    }
}

/* ---------- Print ---------- */
@media print {
    .sidebar,
    .topbar,
    .page-header-actions,
    .pagination,
    .btn {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
