/* ==================================
   V-Right Exchange Admin Panel CSS - THEMED TO LOGO
   ================================== */

:root {
    /* PRIMARY derived from logo cyan/turquoise (sampled) */
    --primary-color: #03A4E8;      /* rgb(3,164,232) - bright cyan */
    --primary-color-dark: #0289C0; /* darker primary for hover/shadows */
    --primary-color-soft: rgba(3,164,232,0.12);

    /* SECONDARY derived from logo gold */
    --secondary-color: #FFD01E;    /* rgb(255,208,30) - gold/yellow */

    /* keep other roles but adjusted where appropriate */
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --success-color: var(--secondary-color); /* success uses gold accent now */
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================================
   Global Styles
   ================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================================
   Layout Structure
   ================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed);
}

.admin-main.sidebar-collapsed {
    margin-left: 0;
}

/* ==================================
   Sidebar Styles - THEMED
   ================================== */

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    /* Use a deep, slightly bluish charcoal that pairs well with cyan/gold */
    background: linear-gradient(180deg, #081426 0%, #041018 100%);
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition-speed);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar-brand {
    padding: 15px 20px;
    text-align: center;
}

.sidebar-brand-logo {
    max-width: 130px;     /* adjust depending sidebar width */
    height: auto;         /* keeps natural aspect ratio */
    object-fit: contain;
    display: inline-block;
    align-items: center;
}

.sidebar-brand-text {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
}


.sidebar-menu {
    padding: 20px 0;
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 5px;
    position: relative;
}

/* Active Link Styling */
.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.75);
    transition: all var(--transition-speed);
    position: relative;
    border-left: 3px solid transparent;
}

/* subtle cyan gradient underlines */
.sidebar-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    transition: width var(--transition-speed);
}

.sidebar-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding-left: 25px;
}

.sidebar-menu-link:hover::before {
    width: 100%;
}

/* Active State - use primary cyan */
.sidebar-menu-link.active {
    background: linear-gradient(90deg, rgba(3,164,232,0.14) 0%, transparent 100%);
    color: #fff !important;
    border-left-color: var(--primary-color);
    font-weight: 600;
    box-shadow: inset 0 0 20px rgba(3,164,232,0.06);
}

.sidebar-menu-link.active::before {
    width: 100%;
}

.sidebar-menu-link.active .sidebar-menu-icon {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(3,164,232,0.45));
}

.sidebar-menu-link.active .sidebar-menu-text {
    color: #fff;
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all var(--transition-speed);
}

.sidebar-menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.sidebar-menu-badge {
    background-color: var(--danger-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Submenu Styles */
.sidebar-submenu {
    list-style: none;
    padding-left: 52px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed);
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-menu-item.has-submenu.open .sidebar-submenu {
    max-height: 500px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.sidebar-submenu-link {
    display: block;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    transition: all var(--transition-speed);
    position: relative;
    padding-left: 15px;
}

.sidebar-submenu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all var(--transition-speed);
}

.sidebar-submenu-link:hover {
    color: #fff;
    padding-left: 20px;
}

.sidebar-submenu-link:hover::before {
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

.sidebar-submenu-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.sidebar-submenu-link.active::before {
    background: var(--primary-color);
    width: 8px;
    height: 8px;
    box-shadow: 0 0 10px var(--primary-color);
}

.sidebar-toggle-icon {
    transition: transform var(--transition-speed);
    width: 16px;
    height: 16px;
}

.has-submenu.open .sidebar-toggle-icon {
    transform: rotate(90deg);
}

/* ==================================
   Topbar Styles
   ================================== */

.admin-topbar {
    height: var(--topbar-height);
    background-color: #fff;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--dark-color);
    transition: all var(--transition-speed);
    border-radius: 6px;
}

.sidebar-toggle-btn:hover {
    background-color: var(--light-color);
    transform: scale(1.05);
}

.topbar-search {
    position: relative;
}

.topbar-search-input {
    width: 350px;
    padding: 10px 15px 10px 40px;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all var(--transition-speed);
}

.topbar-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3,164,232,0.10);
}

.topbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9CA3AF;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition-speed);
    color: var(--dark-color);
}

.topbar-icon-btn:hover {
    background-color: var(--light-color);
    transform: scale(1.05);
}

.topbar-icon-btn-icon {
    width: 22px;
    height: 22px;
}

.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--danger-color);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.topbar-user:hover {
    background-color: var(--light-color);
}

.topbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E5E7EB;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-color);
}

.topbar-user-role {
    font-size: 12px;
    color: #6B7280;
}

/* ==================================
   Main Content Area
   ================================== */

.admin-content {
    flex: 1;
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-separator {
    color: #D1D5DB;
}

/* ==================================
   Cards & Widgets
   ================================== */

.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    border: 1px solid #E5E7EB;
    transition: box-shadow var(--transition-speed);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 25px;
    border-top: 1px solid #E5E7EB;
    background-color: var(--light-color);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* use primary cyan -> softer gradient stop */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2BB7F0 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    color: #fff;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #FFDA5A 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #FBBF24 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #F87171 100%);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-card-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    opacity: 0.9;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.stat-trend.up {
    color: #fff;
}

.stat-trend.down {
    color: rgba(255, 255, 255, 0.7);
}

/* ==================================
   Tables
   ================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.data-table thead {
    background-color: var(--light-color);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--dark-color);
    border-bottom: 2px solid #E5E7EB;
    white-space: nowrap;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 14px;
    color: #4B5563;
}

.data-table tbody tr {
    transition: background-color var(--transition-speed);
}

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

.table-actions {
    display: flex;
    gap: 8px;
}

.table-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-details h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.user-details p {
    margin: 0;
    font-size: 12px;
    color: #6B7280;
}

/* ==================================
   Buttons
   ================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    box-shadow: 0 4px 12px rgba(3,164,232,0.28);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6B7280;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #4B5563;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-success:hover {
    /* slightly darker gold on hover */
    background-color: #F0B400;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: #DC2626;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning-color);
    color: #fff;
}

.btn-warning:hover {
    background-color: #D97706;
    transform: translateY(-2px);
}

.btn-info {
    background-color: var(--info-color);
    color: #fff;
}

.btn-info:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* ==================================
   Forms
   ================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--dark-color);
}

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all var(--transition-speed);
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3,164,232,0.10);
}

.form-control:disabled {
    background-color: #F3F4F6;
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--secondary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6B7280;
}

.invalid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--danger-color);
}

.valid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--secondary-color);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    cursor: pointer;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
}

.file-upload-input {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--light-color);
    border: 2px dashed #D1D5DB;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.file-upload-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(3,164,232,0.05);
}

/* ==================================
   Badges & Tags
   ================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background-color: rgba(3,164,232,0.10);
    color: var(--primary-color);
}

.badge-success {
    background-color: rgba(255, 208, 30, 0.12);
    color: var(--secondary-color);
}

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

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.badge-secondary {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6B7280;
}

/* ==================================
   Modals
   ================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateZ(0);
    transition: all var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform var(--transition-speed);
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.modal-close:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==================================
   Alerts & Toasts
   ================================== */

.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 14px;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-speed);
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background-color: rgba(255, 208, 30, 0.12);
    border-left-color: var(--secondary-color);
    color: #5a3f00;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
    color: #991B1B;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: #92400E;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info-color);
    color: #1E40AF;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================================
   Pagination
   ================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.page-link:hover {
    background-color: var(--light-color);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================================
   Dropdown Menus
   ================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed);
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--dark-color);
    font-size: 14px;
    transition: all var(--transition-speed);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 8px 0;
}

/* ==================================
   Auth Pages
   ================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2BB7F0 100%);
    padding: 20px;
}

.auth-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #6B7280;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #6B7280;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==================================
   Mobile Navigation Overlay Fix
   ================================== */

body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

/* ==================================
   Responsive Design
   ================================== */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
        --topbar-height: 60px;
    }
    
    /* Always hide sidebar by default on mobile */
    .admin-main {
        margin-left: 0 !important;
    }
    
    /* Sidebar positioning for mobile */
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 10001 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Show sidebar when active */
    .admin-sidebar.mobile-active {
        transform: translateX(0);
    }
    
    .topbar-search-input {
        width: 200px;
    }
    
    .topbar-user-info {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-content {
        padding: 20px 15px;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
        border: 1px solid #E5E7EB;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .modal-dialog {
        max-width: 100%;
        margin: 20px;
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .topbar-search {
        display: none;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================================
   Utility Classes
   ================================== */

.text-center {
    text-align: center;
}

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

.text-left {
    text-align: left;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--secondary-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-muted {
    color: #6B7280;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

/* ==================================
   Loading & Spinners
   ================================== */

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
