/* ===================================================================
   RENTLAR - Modern Professional Theme
   =================================================================== */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --secondary: #64748b;
    --success: #10b981;
    --info: #06b6d4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f1f5f9;
    --white: #ffffff;
    --body-bg: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #4f46e5;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.2s ease;
}

/* ===== GLOBAL RESETS ===== */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: var(--sidebar-bg) !important;
    width: 260px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar .nav {
    padding: 0;
}

.sidebar .sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar .sidebar-brand .brand-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.sidebar .sidebar-brand .brand-sub {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
}

.sidebar .nav-section {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
}

.sidebar .nav-item .nav-link {
    padding: 0.625rem 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0;
    margin: 1px 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar .nav-item .nav-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar .nav-item.active>.nav-link,
.sidebar .nav-item .nav-link.active {
    background: var(--sidebar-active);
    color: white;
    font-weight: 600;
}

.sidebar .nav-item .nav-link .menu-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.8;
}

.sidebar .nav-item.active>.nav-link .menu-icon,
.sidebar .nav-item .nav-link.active .menu-icon {
    opacity: 1;
}

.sidebar .sub-menu {
    padding-left: 0;
}

.sidebar .sub-menu .nav-item .nav-link {
    padding-left: 3.25rem;
    font-size: 0.8rem;
}

.sidebar .menu-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.sidebar .nav-item.active .menu-arrow {
    transform: rotate(90deg);
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.top-navbar .navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-navbar .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-navbar .page-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.top-navbar .btn-toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.top-navbar .btn-toggle-sidebar:hover {
    background: var(--light);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notification-bell:hover {
    background: var(--light);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* User Dropdown */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
    border: none;
    background: none;
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.user-info .user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition);
}

.content-area {
    padding: 1.5rem;
    max-width: 1400px;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-card.stat-primary .stat-icon {
    background: var(--primary-50);
    color: var(--primary);
}

.stat-card.stat-success .stat-icon {
    background: #ecfdf5;
    color: var(--success);
}

.stat-card.stat-info .stat-icon {
    background: #ecfeff;
    color: var(--info);
}

.stat-card.stat-warning .stat-icon {
    background: #fffbeb;
    color: var(--warning);
}

.stat-card.stat-danger .stat-icon {
    background: #fef2f2;
    color: var(--danger);
}

/* ===== TABLES ===== */
.table {
    font-size: 0.8125rem;
}

.table thead th {
    background: var(--light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--primary-50);
}

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

/* ===== BUTTONS ===== */
.btn {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
}

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

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    color: white;
}

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

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

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

.btn-warning:hover {
    background: #d97706;
    color: white;
}

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

.btn-info:hover {
    background: #0891b2;
    color: white;
}

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

.btn-secondary:hover {
    background: #475569;
    color: white;
}

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

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

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: var(--transition);
    background-color: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

/* ===== BADGES ===== */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3em 0.65em;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.badge-primary,
.bg-primary {
    background-color: var(--primary) !important;
}

.badge-success,
.bg-success {
    background-color: var(--success) !important;
}

.badge-danger,
.bg-danger {
    background-color: var(--danger) !important;
}

.badge-warning,
.bg-warning {
    background-color: var(--warning) !important;
}

.badge-info,
.bg-info {
    background-color: var(--info) !important;
}

.badge-secondary,
.bg-secondary {
    background-color: var(--secondary) !important;
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #ecfeff;
    color: #155e75;
    border-left: 4px solid var(--info);
}

/* ===== PAGINATION ===== */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary);
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

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

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.375rem;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: var(--transition);
}

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

.dropdown-divider {
    margin: 0.25rem 0;
    border-color: var(--border-color);
}

/* ===== NOTIFICATION LIST ===== */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--light);
}

.notification-item.unread {
    background: var(--primary-50);
    border-left: 3px solid var(--primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.notification-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== FOOTER ===== */
.main-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--white);
}

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4338ca 50%, #6366f1 75%, #818cf8 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(1deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}

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

.auth-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.auth-logo h2 {
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-card .form-control {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.auth-card .btn-primary {
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-wrapper {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header .breadcrumb {
    font-size: 0.75rem;
    margin: 0;
    padding: 0;
    background: none;
}

/* ===== DATATABLE OVERRIDES ===== */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h5 {
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.8125rem;
}

/* ===== PROFILE SECTION ===== */
.profile-photo-upload {
    position: relative;
    display: inline-block;
}

.profile-photo-upload .photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
    color: white;
    font-size: 1.25rem;
}

.profile-photo-upload:hover .photo-overlay {
    opacity: 1;
}

.profile-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.profile-initials-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

/* ===== SETTINGS TABS ===== */
.settings-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.settings-nav .nav-link.active {
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 600;
}

.settings-nav .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}