:root {
    /* Color system */
    --primary: #492A91;
    --primary-dark: #3584E0;
    --primary-light: #e0f2f2;
    --secondary: #6a5acd;
    --secondary-dark: #5648b8;
    --secondary-light: #eeecfd;
    --accent: #ff7f50;
    --accent-dark: #e36b42;
    --accent-light: #fff0eb;
    
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    
    --dark: #343a40;
    --secondary-dark: #6c757d;
    --light: #f8f9fa;
    --white: #ffffff;
    
    /* Spacing system (based on 8px) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-small: 0.875rem;
    --font-size-normal: 1rem;
    --font-size-medium: 1.125rem;
    --font-size-large: 1.25rem;
    --font-size-xlarge: 1.5rem;
    --font-size-xxlarge: 2rem;
    
    /* Borders and shadows */
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1050;
    --z-tooltip: 1070; 
	
	--primary-gradient: linear-gradient(90deg, #FF5EDF, #04C8DE); 
	--color-dark: #0e0e1c;
    --color-text: #ffffff;
    --accent-light: #7f70f5;
    --accent-mid: #d16ba5;
    --accent-dark: #12c2e9;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-normal);
    line-height: 1.5;
    color: var(--dark);
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--space-2);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
    z-index: var(--z-fixed);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: var(--space-2) var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: var(--primary-gradient);
}

.sidebar-header h1 {
    font-size: var(--font-size-xlarge);
    margin: 0;
    color: var(--white);
}
.sidebar-header h1 img {
	vertical-align:middle;
}
.sidebar-user {
    padding: var(--space-3);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: var(--space-2);
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary);
    color: var(--white);
    font-size: var(--font-size-large);
    font-weight: bold;
    text-transform: uppercase;
}

.user-info h3 {
    font-size: var(--font-size-medium);
    margin-bottom: 0;
    color: var(--white);
}

.user-info p {
    font-size: var(--font-size-small);
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-nav {
    padding: var(--space-2) 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    color: rgba(255, 255, 255, 0.8);
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
}

.sidebar-nav li.active a {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-weight: 600;
}

.sidebar-nav svg {
    width: 20px;
    height: 20px;
    margin-right: var(--space-2);
}

main {
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

main.with-sidebar {
    margin-left: 250px;
}

.content {
    padding: var(--space-2) var(--space-3);
}

/* Mobile Navigation Elements */
.mobile-only {
    display: none;
}

.mobile-nav-left {
    display: none;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.mobile-logo {
    height: 50px;
    width: auto;
    display: block;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mobile-logo-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.mobile-logo-link:active {
    opacity: 0.6;
}

/* Hamburger Menu Button */
.hamburger-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 32px;
    min-width: 40px;
    min-height: 32px;
    cursor: pointer;
    position: relative;
    padding: 4px;
    z-index: calc(var(--z-fixed) + 10);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger-toggle span {
    background-color: #492A91;
    height: 4px;
    width: 100%;
    display: block;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
    transform-origin: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hamburger animation when active - transforms to X */
.hamburger-toggle.active span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
    background-color: var(--primary);
}

.hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-toggle.active span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
    background-color: var(--primary);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Sidebar Close Button (Mobile) */
.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.sidebar-close-btn svg {
    display: block;
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* Header */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    background-color: var(--white);
    border-bottom: 1px solid #e3e3e3;
    box-shadow: var(--shadow-sm);
}

.main-header h2 {
    margin: 0;
    font-size: var(--font-size-xlarge);
    color: var(--dark);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.dropbtn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: var(--font-size-normal);
    color: var(--dark);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.dropbtn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropbtn img, .dropbtn .user-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: var(--space-1);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    z-index: var(--z-dropdown);
}

.dropdown-content a {
    color: var(--dark);
    padding: var(--space-1) var(--space-2);
    display: block;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

/* Menu Toggle Button (Desktop Sidebar Collapse) */
.menu-toggle {
    background: transparent;
    border: none;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: relative;
    margin-left: auto;
    display: none;
}

.menu-toggle span {
    background-color: var(--white);
    height: 3px;
    width: 100%;
    display: block;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 11px;
}

.menu-toggle span:nth-child(3) {
    top: 22px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-normal);
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    color: var(--white);
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    color: var(--white);
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.btn-success {
    color: var(--white);
    background-color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    color: var(--white);
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    color: var(--white);
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    color: var(--white);
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-light {
    color: var(--dark);
    background-color: var(--light);
    border-color: #e3e3e3;
}

.btn-light:hover {
    color: var(--dark);
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.btn-info {
    color: var(--white);
    background-color: var(--info);
    border-color: var(--info);
}

.btn-info:hover {
    color: var(--white);
    background-color: #138496;
    border-color: #117a8b;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-2);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-normal);
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--dark);
    background-color: var(--white);
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25);
}

label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-8, .col-md-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-3);
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header:first-child {
    border-radius: calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.page-header h2 {
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* Tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: var(--space-2);
    color: var(--dark);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-align: left;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    color: var(--white);
    background-color: var(--primary);
}

.badge-secondary {
    color: var(--white);
    background-color: var(--secondary-dark);
}

.badge-success {
    color: var(--white);
    background-color: var(--success);
}

.badge-danger {
    color: var(--white);
    background-color: var(--danger);
}

.badge-warning {
    color: #212529;
    background-color: var(--warning);
}

.badge-info {
    color: var(--white);
    background-color: var(--info);
}

/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    justify-content: center;
    margin-top: var(--space-3);
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--primary);
    background-color: var(--white);
    border: 1px solid #dee2e6;
}

.page-link:hover {
    z-index: 2;
    color: var(--primary-dark);
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25);
}

.page-link.active {
    z-index: 3;
    color: var(--white);
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.search-form input[type="text"] {
    width: 250px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
}

/* No Data Placeholder */
.no-data {
    text-align: center;
    color: #6c757d;
    padding: var(--space-4) 0;
}

.no-data-container {
    text-align: center;
    padding: var(--space-4) 0;
}

.no-data-container svg {
    color: #adb5bd;
    margin-bottom: var(--space-2);
}

/* User Table Info */
.user-table-info {
    display: flex;
    align-items: center;
}

.user-table-info img,
.user-table-info .user-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: var(--space-1);
}

.user-edit-image {
    max-width: 100px;
    max-height: 100px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

/* Current Image */
.current-image {
    margin-top: var(--space-1);
}

.current-image img {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 2px;
}

.current-image p {
    font-size: var(--font-size-small);
    color: #6c757d;
    margin-bottom: 5px;
}

/* Dashboard Styles */
.dashboard {
    margin-top: var(--space-2);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--space-2);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
	text-decoration:none;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-2);
}

.stat-icon svg {
    color: var(--primary);
}

.stat-content h3 {
    font-size: var(--font-size-normal);
    margin-bottom: 0;
    color: #6c757d;
}

.stat-number {
    font-size: var(--font-size-xlarge);
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-3);
}

.dashboard-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-2);
}

.dashboard-card h3 {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid #e9ecef;
}

.dashboard-table {
    width: 100%;
    font-size: var(--font-size-small);
}

.dashboard-table th, 
.dashboard-table td {
    padding: 8px;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: var(--space-2);
    font-size: var(--font-size-small);
    color: var(--primary);
}

/* Login Page Styles */
.login-page {
    background-color: var(--primary-light);
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: var(--space-2);
}

.login-box {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.login-header {
    background-color: var(--primary);
    color: var(--white);
    padding: var(--space-3);
    text-align: center;
}

.login-header h1 {
    margin-bottom: 0;
    font-size: var(--font-size-xxlarge);
}

.login-header p {
    margin: var(--space-1) 0 0;
    opacity: 0.8;
}

.login-form {
    padding: var(--space-3);
}

.login-form .form-group {
    margin-bottom: var(--space-2);
    position: relative;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: var(--font-size-normal);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.2);
}

.focused label {
    color: var(--primary);
}

/* Profile Styles */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.profile-header {
    background-color: var(--primary);
    padding: var(--space-3);
    text-align: center;
    color: var(--white);
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
    margin: 0 auto var(--space-2);
}

.profile-initial {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--white);
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
    margin: 0 auto var(--space-2);
}

.profile-header h3 {
    margin-bottom: var(--space-1);
    font-size: var(--font-size-xlarge);
}

.profile-info {
    padding: var(--space-3);
}

.info-item {
    display: flex;
    margin-bottom: var(--space-1);
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: var(--space-1);
}

.info-label {
    font-weight: 600;
    min-width: 100px;
    color: #6c757d;
}

.info-value {
    flex: 1;
}

/* Row Utility */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.text-muted { color: #6c757d !important; }
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--danger) !important; }

/* Host and Seller Management */
.hosts-container, .sellers-container {
    margin-top: var(--space-3);
}

.hosts-list, .sellers-list {
    margin-bottom: var(--space-2);
}

.host-item, .seller-item {
    display: flex;
    align-items: center;
    padding: var(--space-1);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-1);
    background-color: #f8f9fa;
    position: relative;
}


.host-item:hover, .seller-item:hover {
    background-color: #e9ecef;
}

.host-info, .seller-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.host-info img, .seller-info img,
.host-info .user-initial, .seller-info .user-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: var(--space-1);
}

.host-details, .seller-details {
    flex: 1;
}

.host-details h4, .seller-details h4 {
    margin: 0;
    font-size: var(--font-size-normal);
}

.host-details p, .seller-details p {
    margin: 0;
    font-size: var(--font-size-small);
    color: #6c757d;
}

.hidden-checkbox {
    display: none;
}

.available {
    border-left: 4px solid var(--success);
}


.quick-add-form {
    background-color: #f8f9fa;
    padding: var(--space-2);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-3);
}

.quick-add-form h4 {
    margin-top: 0;
    margin-bottom: var(--space-2);
}

/* Seller Schedule Styles */
.seller-drag-handle {
    cursor: move;
    padding: 0 var(--space-1);
    margin-right: var(--space-1);
    color: #6c757d;
}

.seller-duration {
    margin-right: var(--space-1);
    width: 100px;
}

.schedule-controls {
    display: flex;
    align-items: flex-end;
    gap: var(--space-1);
}

.schedule-controls .form-group {
    margin-bottom: 0;
    min-width: 120px;
}

.dragging {
    opacity: 0.5;
}

.seller-item-placeholder {
    background-color: #f1f1f1;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-1);
}

#scheduleOutput {
    font-family: monospace;
    height:500px;
}

/* Show Tabs */
.show-tabs {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tab-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-link {
    padding: var(--space-2) var(--space-3);
    color: #6c757d;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
}

.tab-link svg {
    margin-right: var(--space-1);
}

.tab-link:hover {
    color: var(--dark);
    text-decoration: none;
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    padding: var(--space-3);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Embed Code */
.embed-preview {
    margin-top: var(--space-3);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-3);
}

.embed-frame {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: var(--space-2);
    height: 500px;
    overflow: auto;
}

.signup-form {
    max-width: 100%;
    margin: 0 auto;
}

.signup-form h2 {
    text-align: center;
    color: var(--primary);
}

.signup-form p {
    text-align: center;
    margin-bottom: var(--space-3);
}

.embed-code-info {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: var(--space-2);
}

.embed-code-info h4 {
    color: var(--primary);
}

.embed-code-info ul {
    padding-left: var(--space-3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: var(--space-3);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--dark);
}


.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.has-submenu > a::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.has-submenu.active > a::after {
    transform: rotate(-135deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.1);
}

.has-submenu.active .submenu {
    max-height: 500px;
}

.submenu li a {
    padding-left: 56px !important;
    font-size: 0.9em;
}

.submenu li.active a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

#availableSellersList {max-height:250px;overflow-y:scroll;overflow-x:hidden;}

/* Sponsor Item Styles */
.sponsor-item {
    display: flex;
    align-items: center;
    padding: var(--space-2);
    border-bottom: 1px solid #e9ecef;
}

.sponsor-item:last-child {
    border-bottom: none;
}

.sponsor-item .d-flex {
    display: flex;
    align-items: center;
    width: 100%;
    gap: var(--space-2);
}

.sponsor-item img {
    /* Match seller/host avatar sizing to keep layout consistent */
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    padding: 0;
    background-color: var(--white);
    flex-shrink: 0;
}

.sponsor-item .user-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sponsor-item h5 {
    margin: 0;
    font-size: var(--font-size-normal);
    flex: 1;
}

.sponsor-item .ms-auto {
    margin-left: auto;
}

.sponsors-list {
    max-height: 400px;
    overflow-y: auto;
}

.current-sponsors-list {
    min-height: 100px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    main.with-sidebar {
        margin-left: 200px;
    }
    
    .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* ========================================
       MOBILE SIDEBAR - Slide-in from left
       ======================================== */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        z-index: calc(var(--z-fixed) + 5);
        box-shadow: none;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.35s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: var(--primary);
    }
    
    /* Sidebar open state */
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.35);
    }
    
    /* Ensure overlay covers everything when active */
    .sidebar-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: calc(var(--z-fixed) + 1);
        opacity: 1;
        visibility: visible;
    }
    
    /* Hide the internal sidebar toggle on mobile */
    .sidebar-header .menu-toggle {
        display: none;
    }
    
    /* Sidebar header needs relative positioning for close button */
    .sidebar-header {
        position: relative;
        background: var(--primary-gradient);
    }
    
    /* Ensure sidebar content is contained properly */
    .sidebar-user {
        background-color: var(--primary);
        position: relative;
    }
    
    .sidebar-nav {
        background-color: var(--primary);
        position: relative;
    }
    
    /* ========================================
       MOBILE MAIN CONTENT
       ======================================== */
    main.with-sidebar {
        margin-left: 0;
    }
    
    /* ========================================
       MOBILE HEADER LAYOUT
       ======================================== */
    .main-header {
        position: sticky;
        top: 0;
        z-index: calc(var(--z-fixed) - 2);
        padding: 10px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background-color: var(--white);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    /* Mobile nav left - hamburger + logo */
    .mobile-only {
        display: block;
    }
    
    .mobile-nav-left {
        display: flex;
        align-items: center;
        gap: 12px;
        order: -1;
        flex-shrink: 0;
    }
    
    .mobile-logo {
        height: 50px;
        width: auto;
    }
    
    /* Page title in center */
    .main-header h2#pageTitle {
        font-size: 1rem;
        flex: 1;
        text-align: center;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        order: 0;
        color: var(--dark);
    }
    
    /* Desktop elements hidden */
    .desktop-only {
        display: none !important;
    }
    
    /* ========================================
       USER DROPDOWN - Mobile optimized
       ======================================== */
    .user-dropdown {
        order: 1;
        flex-shrink: 0;
    }
    
    .dropbtn {
        padding: 4px;
        min-width: auto;
        background: transparent;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
    }
    
    /* Hide ALL text content inside dropbtn on mobile */
    .dropbtn .username-text {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        clip: rect(0, 0, 0, 0) !important;
    }
    
    .dropbtn > span:not(.user-initial) {
        display: none !important;
    }
    
    /* Hide dropdown arrow on mobile */
    .dropbtn > svg,
    .dropbtn svg {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* User avatar styling */
    .dropbtn img,
    .dropbtn .user-initial {
        margin-right: 0 !important;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid var(--primary);
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(73, 42, 145, 0.2);
    }
    
    .dropbtn .user-initial {
        font-size: 1rem;
        background-color: var(--primary);
        color: var(--white);
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* ========================================
       HAMBURGER MENU BUTTON - Mobile
       ======================================== */
    .hamburger-toggle {
        width: 44px;
        height: 36px;
        position: relative;
        z-index: calc(var(--z-fixed) + 10);
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        border-radius: 8px;
        padding: 8px;
        box-shadow: 0 2px 8px rgba(73, 42, 145, 0.25);
    }
    
    .hamburger-toggle span {
        background-color: #ffffff;
        height: 3px;
        border-radius: 2px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    }
    
    .hamburger-toggle:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(73, 42, 145, 0.35);
    }
    
    .hamburger-toggle:active {
        transform: scale(0.95);
    }
    
    /* ========================================
       MOBILE MENU TOGGLE (Desktop toggle hidden)
       ======================================== */
    .menu-toggle {
        display: none !important;
    }
    
    /* ========================================
       FORM AND LAYOUT ADJUSTMENTS
       ======================================== */
    .form-row {
        flex-direction: column;
    }
    
    .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-8, .col-md-12 {
        max-width: 100%;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        display:none;
    }
    
    .page-actions {
        margin-top: var(--space-1);
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .search-form input[type="text"] {
        width: 100%;
        max-width: 200px;
    }
    
    .embed-preview {
        grid-template-columns: 1fr;
    }
    
    /* Content padding adjustments */
    .content {
        padding: var(--space-2);
    }
    
    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: var(--space-2);
    }
    
    .card-header {
        padding: var(--space-2);
    }
    
    .card-body {
        padding: var(--space-2);
    }

    .btn-change-profile-image {
        display:none;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .main-header {
        padding: 8px 12px;
    }
    
    .mobile-logo {
        height: 40px;
    }
    
    .main-header h2#pageTitle {
        font-size: 0.9rem;
    }
    
    .hamburger-toggle {
        width: 40px;
        height: 32px;
    }
    
    .hamburger-toggle.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
        background-color: #ffffff;
    }
    
    .hamburger-toggle.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
        background-color: #ffffff;
    }
    

    
    .sidebar {
        width: 260px;
    }
    
    .page-actions .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}
