﻿﻿/* Admin Panel Styles - Royal Apartments */

/* Color Variables */
:root {
    --primary-blue: #3b82f6;
    --royal-blue: #2563eb;
    --accent-gold: #fbbf24;
    --bright-gold: #f59e0b;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #6b7280;
    --charcoal: #333333;
    --border-light: #cfd8e3;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.1);
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    background: var(--white);
}

/* Login Page Styles */
.login-page {
    height: 100vh;
    overflow: hidden;
}

.login-container {
    display: flex;
    height: 100vh;
    position: relative;
}

.login-card {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: var(--white);
    z-index: 2;
    box-shadow: var(--shadow-large);
}

.login-background {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    position: relative;
    background-image: url('../mall.png');
    background-size: cover;
    background-position: center;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(30, 58, 138, 0.9) 0%,
            rgba(30, 64, 175, 0.8) 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--accent-gold);
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.login-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
}

/* Required field asterisk - red */
.required-star {
    color: #ef4444 !important;
    font-weight: 700;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 3rem !important;
    padding-left: 3rem !important;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input:checked+.checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.remember-me input:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--accent-gold);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--bright-gold) 100%);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 4px solid var(--error-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Dashboard Layout */
.admin-layout {
    display: flex;
    height: 100vh;
    background: var(--light-gray);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid var(--border-light) !important;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    /* border-bottom: 1px solid var(--border-light); */
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.sidebar-header .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header .logo-icon i {
    font-size: 1rem;
    color: white;
}

.sidebar-header .logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-header .logo-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.2;
    margin: 0;
}

.sidebar-header .logo-text span {
    font-size: 0.7rem;
    color: var(--medium-gray);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem 0.75rem;
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.5rem;
    color: var(--medium-gray);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-blue);
}

.nav-item.active {
    background: #3b82f6;
    color: white;
    font-weight: 500;
}

.nav-item.active i {
    color: white;
}

/* Sidebar Footer - User Profile */
.sidebar-footer {
    padding: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: none;
    border-radius: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    color: #64748b;
}

.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    background: transparent;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--charcoal);
}

.user-menu-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    min-width: 140px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.user-menu-item:hover {
    background: var(--light-gray);
}

.user-menu-item.logout-item {
    color: #ef4444;
}

.user-menu-item.logout-item:hover {
    background: #fef2f2;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--medium-gray);
}

.breadcrumb-item.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--border-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--charcoal);
}

.admin-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-btn {
    background: var(--accent-gold);
    color: var(--primary-blue);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: var(--bright-gold);
    transform: translateY(-1px);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--white);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--medium-gray);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    background-color: white;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--charcoal);
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.widget {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.widget:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.widget-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.widget-icon.revenue {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
}

.widget-icon.bookings {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
}

.widget-icon.occupancy {
    background: linear-gradient(135deg, var(--warning-orange) 0%, #d97706 100%);
}

.widget-icon.apartments {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--bright-gold) 100%);
}

.widget-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.widget-label {
    color: var(--medium-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.widget-trend {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
}

.widget-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.widget-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.chart-wrapper {
    padding: 1.5rem;
    min-height: 280px;
}

.chart-wrapper canvas {
    max-height: 250px;
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table-container,
.table-responsive {
    background: var(--white);
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-light);
}

/* When table-container is inside a card, stretch full width past card padding */
.card > .table-container,
.card > .table-responsive {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
}

.table,
.data-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.table th,
table.table thead th,
.data-table th,
table.data-table thead th {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: none !important;
    white-space: nowrap;
}

.table td,
.data-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) {
    background: rgba(30, 58, 138, 0.02);
}

.table tbody tr:hover,
.data-table tbody tr:hover {
    background: rgba(30, 58, 138, 0.05);
}

/* Clickable Row Styles */
.table tbody tr.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.table tbody tr.clickable-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    transform: translateX(2px);
    box-shadow: -3px 0 0 0 var(--primary-blue);
}

.table tbody tr.clickable-row:active {
    transform: translateX(0);
}


/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--royal-blue);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--accent-gold);
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--bright-gold);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-red);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Status Badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-confirmed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-orange);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

.status-completed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.status-occupied {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

/* Modal Styles - Custom & Bootstrap compatible */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.4);
    z-index: 1055;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
}

.modal.show {
    display: flex !important;
    background-color: rgba(30, 58, 138, 0.4);
}

.modal-backdrop {
    backdrop-filter: blur(5px);
    z-index: 1050 !important;
}

.modal .modal-content {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    width: 100%;
    max-width: 750px;
    position: relative;
    padding: 2rem;
    margin: auto;
    z-index: 9999;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    position: relative;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

/* Modal Footer */
.modal-footer {
    display: flex !important;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Modal footer button styles - Cancel = red, Save/Action = blue */
.modal-footer .btn-secondary,
.modal-footer .btn-cancel {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.modal-footer .btn-secondary:hover,
.modal-footer .btn-cancel:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Global btn-cancel hover — never turn white */
.btn-cancel {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
}
.btn-cancel:hover,
.btn-cancel:focus,
.btn-cancel:active {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border: none !important;
}

.modal-footer .btn-primary {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.modal-footer .btn-success {
    background-color: #22c55e !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.modal-footer .btn-primary:hover {
    background-color: #2563eb !important;
}

.modal-footer .btn-success:hover {
    background-color: #16a34a !important;
}

/* Bootstrap modal dialog width override */
.modal .modal-dialog {
    max-width: 750px !important;
    width: 100%;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1.5px solid #9ca3af;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Charts Container */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    height: 400px;
    /* Fixed height for consistent sizing */
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    text-align: center;
    flex-shrink: 0;
    /* Prevent title from shrinking */
}

.chart-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 0;
    /* Allow flex child to shrink */
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive Design */
/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    z-index: 101;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.hamburger-menu:hover {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--primary-blue) 100%);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
    transform: translateY(-1px);
}

.hamburger-menu span {
    width: 22px;
    height: 2.5px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: block;
}

.hamburger-menu.active {
    background: var(--accent-gold);
}

.hamburger-menu.active:hover {
    background: var(--bright-gold);
}

.hamburger-menu.active span {
    background: var(--primary-blue);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   TABLET RESPONSIVE (769px - 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .top-header {
        width: 100%;
        padding: 1rem 1.5rem;
    }

    .content-area {
        padding: 1.5rem;
    }

    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* ============================================
   MOBILE LARGE (481px - 768px)
   ============================================ */
@media (max-width: 768px) {

    /* Show hamburger menu */
    .hamburger-menu {
        display: flex !important;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3) !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
        padding: 10px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        cursor: pointer !important;
        z-index: 201 !important;
        flex-shrink: 0 !important;
    }

    .hamburger-menu span {
        width: 22px !important;
        height: 2.5px !important;
        background: #ffffff !important;
        border-radius: 2px !important;
        display: block !important;
        max-width: none !important;
    }

    .hamburger-menu.active {
        background: #fbbf24 !important;
    }

    .hamburger-menu.active span {
        background: #1e3a8a !important;
    }

    /* Login Page */
    .login-container {
        flex-direction: column;
    }

    .login-background {
        display: none;
    }

    .login-card {
        max-width: none;
        padding: 2rem 1.5rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    /* Sidebar - Hidden by default, slide in when open */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        width: 100vw !important;
        max-width: 100% !important;
        left: 0 !important;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: none;
    }

    /* Sidebar footer for profile & logout on mobile */
    .sidebar-footer {
        display: none;
    }

    @media (max-width: 768px) {
        .sidebar-footer {
            display: block;
            margin-top: auto;
            padding: 1rem;
            border-top: 1px solid var(--border-light);
            background: rgba(30, 58, 138, 0.02);
        }

        .sidebar-footer .admin-info {
            display: flex !important;
            flex-direction: row;
            align-items: center;
            gap: 0.8rem;
            margin-bottom: 1rem;
            padding: 0.8rem;
            background: white;
            border-radius: 8px;
            box-shadow: var(--shadow-light);
        }

        .sidebar-footer .admin-avatar {
            width: 40px;
            height: 40px;
            font-size: 1rem;
        }

        .sidebar-footer .admin-info>div {
            display: block !important;
        }

        .sidebar-footer .admin-info>div:first-child {
            font-weight: 600;
            color: var(--charcoal);
            font-size: 0.9rem;
        }

        .sidebar-footer .admin-info>div:last-child {
            color: var(--medium-gray);
            font-size: 0.85rem;
        }

        .sidebar-footer .logout-btn {
            display: flex !important;
            width: 100%;
            justify-content: center;
            padding: 0.8rem;
            font-size: 0.9rem;
        }
    }

    /* Main Content - No left margin on mobile */
    .main-content {
        margin-left: 0;
        align-items: center;
        gap: 0.5rem;
    }

    /* Top Header - Reorganized for mobile */
    .top-header {

        padding: 1rem;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    /* Add Royal Apartments branding */
    .top-header::before {

        content: 'Royal Apartments';
        font-family: 'Playfair Display', serif;
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary-blue);
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Breadcrumb in center */
    .breadcrumb {
        display: none !important;
    }

    /* Hamburger positioned on right (last in flex order) */
    .hamburger-menu {
        flex-shrink: 0;
        margin-left: auto;
    }

    /* Hide profile info and logout from header on mobile */
    .header-actions {
        display: none !important;
    }

    .admin-info {
        display: none !important;
    }

    .logout-btn {
        display: none !important;
    }

    /* Content Area */
    .content-area {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    /* Dashboard Widgets - Single column */
    .dashboard-widgets {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .widget {
        padding: 1.2rem;
    }

    .widget-value {
        font-size: 1.8rem;
    }

    /* Charts */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-container {
        height: 300px;
        padding: 1rem;
    }

    .chart-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Tables - Horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
        /* Force horizontal scroll on small screens */
    }

    .table th,
    .table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .table th {
        font-size: 0.75rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Action buttons - Stack on mobile */
    .table td .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.3rem;
    }

    .table td .btn:last-child {
        margin-bottom: 0;
    }

    /* Forms - Single column */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .input-wrapper input,
    .form-control,
    select,
    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="number"],
    textarea {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .input-wrapper input {
        padding-left: 2.5rem;
    }

    /* Fix dropdown overflow */
    select,
    .form-select,
    .filter-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Filter components */
    .filters-container,
    .filter-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95vw;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    /* Status Badges */
    .status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }

    /* Image Upload */
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.8rem;
    }

    .image-upload-area {
        padding: 1.5rem;
    }

    /* Search/Filter Bars */
    .search-bar,
    .filter-bar {
        flex-direction: column;
        gap: 0.8rem;
    }

    .search-bar input,
    .filter-bar select {
        width: 100%;
        min-height: 44px;
    }
}

/* ============================================
   MOBILE SMALL (320px - 480px)
   ============================================ */
@media (max-width: 480px) {

    /* Login Page */
    .login-card {
        padding: 1.5rem 1rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .login-btn {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    /* Top Header */
    .top-header {
        width: 100%;
        padding: 0.6rem 0.8rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .admin-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .logout-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    /* Content Area */
    .content-area {
        padding: 0.8rem;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
    }

    /* Widgets */
    .widget {
        padding: 1rem;
    }

    .widget-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .widget-value {
        font-size: 1.5rem;
    }

    .widget-label {
        font-size: 0.8rem;
    }

    /* Charts */
    .chart-container {
        height: 250px;
        padding: 0.8rem;
    }

    .chart-title {
        font-size: 0.9rem;
    }

    /* Cards */
    .card {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .card-title {
        font-size: 1rem;
    }

    /* Tables */
    .table {
        min-width: 500px;
    }

    .table th,
    .table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    .table th {
        font-size: 0.7rem;
    }

    /* Buttons */
    .btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
        min-height: 44px;
        /* Touch-friendly */
    }

    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        min-height: 36px;
    }

    /* Forms */
    .form-group label {
        font-size: 0.8rem;
    }

    .input-wrapper input,
    .form-control {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    /* Modals */
    .modal-content {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    /* Image Upload */
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.6rem;
    }

    .image-preview-item img {
        height: 60px;
    }

    /* Status Badges */
    .status-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ============================================
   UTILITY CLASSES FOR MOBILE
   ============================================ */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Touch-friendly spacing */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent horizontal scroll */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .admin-layout {
        overflow-x: hidden;
    }

    /* Force all elements to respect viewport width */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Specific fixes for common overflow causes */
    input,
    select,
    textarea,
    button,
    .form-control,
    .btn,
    .card,
    .modal-content {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure dropdowns don't overflow */
    select option {
        max-width: 100%;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Print Styles */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    .sidebar,
    .logout-btn,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Image Upload Styles */
.image-upload-container {
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.image-upload-area {
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--primary-blue);
    background: rgba(30, 58, 138, 0.02);
}

.image-upload-area.dragover {
    border-color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.1);
}

.upload-placeholder {
    pointer-events: none;
}

.uploaded-images-preview {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--white);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    background: var(--white);
}

.image-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.upload-progress {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--light-gray);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin: 0;
    text-align: center;
}

/* =====================================================
   TOGGLE SWITCH STYLES
   ===================================================== */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background-color: #e5e7eb;
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* =====================================================
   BULK ACTIONS DROPDOWN
   ===================================================== */
.bulk-actions-dropdown {
    position: relative;
    display: inline-block;
}

/* 3-dot button */
.three-dot-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.three-dot-btn:hover {
    background: var(--medium-gray);
    color: white;
}

.bulk-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-dropdown-menu.show {
    display: block;
}

.bulk-dropdown-menu button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--charcoal);
    transition: background 0.2s ease;
}

.bulk-dropdown-menu button:hover {
    background: var(--light-gray);
}

.bulk-dropdown-menu button i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.25rem 0;
}

/* Checkbox Styling */
.apartment-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

#selectAllCheckbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

/* Status Badge for Disabled */
.status-disabled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Selected Row Styles */
.selected-row {
    background: rgba(59, 130, 246, 0.1) !important;
}

.selected-row:hover {
    background: rgba(59, 130, 246, 0.15) !important;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    border-left: 4px solid;
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: var(--charcoal);
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--light-gray);
    color: var(--charcoal);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

/* ===================== SETTINGS PAGE STYLES ===================== */

/* Settings Tabs Container */
.settings-tabs-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    background: var(--white);
    padding: 0.5rem 0.5rem 0;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--charcoal);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.settings-tab i {
    font-size: 0.85rem;
}

.settings-tab:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.05);
}

.settings-tab.active {
    background: var(--white);
    color: var(--primary-blue);
    font-weight: 600;
}

.settings-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
}

/* Tab Content */
.settings-tab-content {
    padding: 0;
    background: var(--white);
}

.tab-pane {
    display: none;
    padding: 1.5rem;
    background: var(--white);
}

.tab-pane.active {
    display: block;
}

.tab-pane .card {
    margin-bottom: 0;
    box-shadow: none;
    border: none;
    background: var(--white);
}

.tab-pane .card-header {
    padding: 0 0 1rem;
}

.tab-pane .card-header>div {
    width: 100%;
}

.count-badge {
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.card-subtitle {
    color: var(--medium-gray);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section-title i {
    color: var(--primary-blue);
}

/* Form Group */
.settings-section .form-group {
    margin-bottom: 1rem;
}

.settings-section .form-group label {
    display: block;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.settings-section .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-section .form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.settings-section textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Dynamic Fields */
.dynamic-fields-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Ensure Add buttons don't stretch full width - yellow compact style */
.settings-section .form-group>.btn-secondary,
.settings-section>.btn-secondary,
.settings-section .btn.btn-secondary.btn-sm {
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--accent-gold) !important;
    color: var(--charcoal) !important;
    border: none !important;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-section .form-group>.btn-secondary:hover,
.settings-section>.btn-secondary:hover,
.settings-section .btn.btn-secondary.btn-sm:hover {
    background-color: #e6a800 !important;
    color: var(--charcoal) !important;
}

.dynamic-field-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dynamic-field-row .form-control {
    flex: 1;
}

.dynamic-field-row select.form-control {
    max-width: 150px;
}

.dynamic-field-row .btn-danger {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-with-icon {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: var(--primary-blue);
    font-size: 0.9rem;
    z-index: 2;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.input-with-icon input,
.input-with-icon .form-control,
.input-with-icon input.form-control {
    padding-left: 2.5rem !important;
    width: 100%;
}

/* Form Actions */
.form-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

.form-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--royal-blue) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.form-actions .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Featured Apartments Grid */
.featured-apartments-info {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.featured-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--charcoal);
    font-weight: 500;
}

.featured-count i {
    color: var(--accent-gold);
}

.apartments-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.apartment-featured-card {
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.apartment-featured-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.apartment-featured-card.featured {
    border-color: var(--accent-gold);
    background: linear-gradient(to bottom, rgba(251, 191, 36, 0.05), var(--white));
}

.apartment-card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.apartment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.featured-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apartment-card-info {
    padding: 1rem;
}

.apartment-card-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apartment-card-info .location {
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-bottom: 0.25rem;
}

.apartment-card-info .location i {
    margin-right: 0.25rem;
    color: var(--primary-blue);
}

.apartment-card-info .price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success-green);
}

.featured-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border-top: 1px solid var(--border-light);
}

.toggle-label {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary-blue);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--success-green);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.error {
    background: var(--error-red);
}

.toast-notification i {
    font-size: 1.2rem;
}

/* Loading placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--medium-gray);
}

.loading-placeholder .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--medium-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .settings-tab {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .settings-tab i {
        display: none;
    }

    .dynamic-field-row {
        flex-wrap: wrap;
    }

    .dynamic-field-row .form-control {
        flex: 1 1 100%;
    }

    .dynamic-field-row select.form-control {
        max-width: 100%;
    }

    .apartments-featured-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Input Container for City/Location fields */
.custom-input-container {
    margin-top: 0.75rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold);
    animation: slideDown 0.2s ease-out;
}

/* Full width custom input container (outside form-grid) */
.custom-input-container.full-width-input {
    margin: 0.75rem 0 1rem 0;
}

.custom-input-label {
    display: block;
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-input-container input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-input-container input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.custom-input-container input::placeholder {
    color: #94a3b8;
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* =====================================================
   LOCATION MANAGEMENT STYLES
   ===================================================== */
.location-list-container {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
}

.location-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.location-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}

.location-item.predefined {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
}

.location-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.location-name {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.95rem;
}

.location-meta {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.location-city-group {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-light);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-orange);
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--medium-gray);
}

.loading-state i {
    margin-right: 0.5rem;
}

/* =====================================================
   CONFIRMATION MODAL STYLES - Clean Design
   ===================================================== */
.confirm-modal-overlay,
.custom-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal-overlay.show,
.custom-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal,
.custom-confirm-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 450px;
    width: 90%;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.confirm-modal-overlay.show .confirm-modal,
.custom-confirm-modal.show .custom-confirm-content {
    transform: scale(1) translateY(0);
}

/* Modal Header with Title and Close Button */
.confirm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 0;
    background: white;
}

.confirm-modal-header h3,
.confirm-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    position: relative;
    padding-bottom: 0.75rem;
}

.confirm-modal-header h3::after,
.confirm-modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-gold, #fbbf24);
    border-radius: 2px;
}

.confirm-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.confirm-modal-close:hover {
    color: #4b5563;
}

/* Modal Body with Icon and Message */
.confirm-modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.confirm-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Warning icon style (yellow/orange) */
.confirm-modal-icon.warning {
    background: #fef3c7;
}

.confirm-modal-icon.warning i {
    font-size: 2.5rem;
    color: #f59e0b;
}

/* Danger icon style (red) */
.confirm-modal-icon.danger {
    background: #fee2e2;
}

.confirm-modal-icon.danger i {
    font-size: 2.5rem;
    color: #ef4444;
}

/* Success icon style (green) */
.confirm-modal-icon.success {
    background: #d1fae5;
}

.confirm-modal-icon.success i {
    font-size: 2.5rem;
    color: #10b981;
}

/* Info icon style (blue) */
.confirm-modal-icon.info {
    background: #dbeafe;
}

.confirm-modal-icon.info i {
    font-size: 2.5rem;
    color: #3b82f6;
}

.confirm-modal-message {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.confirm-modal-subtext {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

/* Modal Actions */
.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
    justify-content: center;
}

.confirm-modal-actions .btn {
    flex: 1;
    max-width: 130px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Cancel Button - Blue outline style */
.confirm-modal-actions .btn-cancel {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.confirm-modal-actions .btn-cancel:hover {
    background: #eff6ff;
}

/* Delete/Danger Button - Red solid style */
.confirm-modal-actions .btn-delete,
.confirm-modal-actions .btn-danger {
    background: #ef4444;
    color: white;
    border: 2px solid #ef4444;
}

.confirm-modal-actions .btn-delete:hover,
.confirm-modal-actions .btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Confirm/Primary Button - Blue solid style */
.confirm-modal-actions .btn-confirm {
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
}

.confirm-modal-actions .btn-confirm:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Legacy support for existing button classes */
.confirm-modal-actions .btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.confirm-modal-actions .btn-secondary:hover {
    background: #eff6ff;
}

/* Status Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.status-confirmed,
.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-orange);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

.status-completed {
    background: rgba(107, 114, 128, 0.1);
    color: var(--medium-gray);
}

.status-upcoming {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
}

.btn-success {
    /* background-color: var(--success-green); */
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

/* Invoice PDF Styles */
.invoice-pdf-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    margin-top: 2rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.invoice-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.invoice-logo {
    width: 60px;
    height: 60px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.invoice-details {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.customer-info {
    margin-bottom: 15px;
}

.customer-name {
    font-weight: 600;
    color: #1e293b;
}

.customer-email,
.customer-phone {
    color: #64748b;
    font-size: 14px;
}

.booking-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-label {
    color: #64748b;
    font-size: 14px;
}

.info-value {
    color: #1e293b;
    font-weight: 500;
    font-size: 14px;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.rate-table th {
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.rate-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 14px;
}

.rate-table .amount {
    text-align: right;
    font-weight: 500;
}

.totals-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 15px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-label {
    color: #64748b;
    font-size: 14px;
}

.total-value {
    color: #1e293b;
    font-weight: 500;
    font-size: 14px;
}

.final-total {
    background: #fef3c7;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.final-total .total-label {
    color: #92400e;
    font-weight: 600;
}

.final-total .total-value {
    color: #92400e;
    font-weight: 700;
    font-size: 16px;
}

.payment-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ===== Maintenance Dates Styles ===== */
.maintenance-dates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.maintenance-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--accent-gold);
    transition: all 0.2s ease;
}

.maintenance-date-item:hover {
    background: #e8e9eb;
    transform: translateX(2px);
}

.maintenance-date-details {
    flex: 1;
}

.maintenance-date-range {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.maintenance-date-reason {
    font-size: 0.85rem;
    color: var(--medium-gray);
    font-style: italic;
}

.btn-remove-maintenance {
    color: var(--error-red);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-remove-maintenance:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Fix Flatpickr date visibility */
.flatpickr-calendar .flatpickr-day {
    color: #333 !important;
    font-weight: 500;
}

.flatpickr-calendar .flatpickr-day.disabled {
    color: #ccc !important;
}

.flatpickr-calendar .flatpickr-day.today {
    border-color: #fbbf24 !important;
}

.flatpickr-calendar .flatpickr-day:hover:not(.disabled) {
    background: #e8e9eb !important;
}

/* Ensure booked indicator doesn't hide the date number */
.flatpickr-day {
    position: relative !important;
    z-index: 1;
}

.booked-indicator {
    position: absolute !important;
    bottom: 2px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 6px !important;
    height: 6px !important;
    background: #fbbf24 !important;
    border-radius: 50% !important;
    z-index: 2 !important;
}

/* ========================================
   Global Button Fixes
   ======================================== */
.btn {
    white-space: nowrap !important;
    /* Prevent text wrapping in buttons */
}

/* ========================================
   Settings Tabs - Horizontal Scrollable
   ======================================== */

.settings-tabs-container {
    margin-bottom: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    width: 100%;
    /* Ensure container doesn't overflow parent width */
    max-width: 100%;
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
    padding: 0;
    width: 100%;
}

/* Prevent whole page scrolling on mobile */
body,
.admin-layout,
.main-content,
.content-area {
    overflow-x: hidden;
}

/* Allow horizontal scroll only on the tabs */
.settings-tabs-container {
    overflow-x: auto;
}

/* Custom scrollbar for webkit browsers */
.settings-tabs::-webkit-scrollbar {
    height: 6px;
}

.settings-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.settings-tabs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.settings-tabs::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.settings-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--medium-gray);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex: 1;
    /* Allow tabs to grow and fill space */
    min-width: fit-content;
}

.settings-tab i {
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--medium-gray);
}

.settings-tab:hover {
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary-blue);
}

.settings-tab.active {
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary-blue);
    border-bottom: 3px solid var(--primary-blue);
    font-weight: 600;
}

.settings-tab.active i {
    color: var(--primary-blue);
}

/* Tab Content Styles */
.settings-tab-content {
    background: var(--white);
    max-width: 100%;
    /* Ensure content doesn't overflow */
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .settings-tab {
        padding: 0.85rem 1rem;
        font-size: 0.75rem;
    }

    .settings-tab i {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .settings-tabs-container {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        width: calc(100% + 2rem);
        /* Compensate for negative margins to span full width */
    }

    .settings-tabs {
        padding: 0 0.5rem;
    }

    .settings-tab {
        padding: 0.75rem 0.9rem;
        font-size: 0.7rem;
    }

    .settings-tab i {
        font-size: 0.95rem;
    }
}

/* =====================================================
   COMPREHENSIVE ADMIN THEME - FINAL OVERRIDE BLOCK
   Covers: layout, sidebar, icons, buttons, tables,
   dropdowns, selects, inputs, action buttons, badges,
   avatars, text colors, borders — ALL pages
   ===================================================== */

/* ── LAYOUT BACKGROUND ── */
.admin-layout .content-area {
    background: #f8fafc !important;
}

/* ── BORDERS: cards, widgets, containers ── */
.admin-layout .sidebar,
.admin-layout .top-header,
.admin-layout .card,
.admin-layout .widget,
.admin-layout .chart-container,
.admin-layout .table-container,
.admin-layout .settings-tabs-container,
.admin-layout .settings-tab-content,
.admin-layout .user-profile {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.admin-layout .card-header,
.admin-layout .modal-header {
    border-bottom: 1px solid #e5e7eb !important;
}

/* ── SIDEBAR ── */
.admin-layout .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e5e7eb !important;
}

/* Nav items */
.admin-layout .nav-item {
    color: #4b5563 !important;
}

.admin-layout .nav-item i {
    color: #6b7280 !important;
}

.admin-layout .nav-item:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.admin-layout .nav-item:hover i {
    color: #2563eb !important;
}

.admin-layout .nav-item.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.admin-layout .nav-item.active i {
    color: #ffffff !important;
}

/* ── SIDEBAR FOOTER / USER PROFILE BLOCK ── */
.admin-layout .sidebar-footer {
    border-top: 1px solid #e5e7eb !important;
    overflow: visible !important;
}

.admin-layout .user-profile {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: visible !important;
}

.admin-layout .user-avatar {
    background: #3b82f6 !important;
    background-image: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.admin-layout .user-name {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.admin-layout .user-role {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

.admin-layout .user-menu-btn {
    color: #6b7280 !important;
}

.admin-layout .user-menu-btn:hover {
    color: #1e293b !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* ── USER MENU DROPDOWN ── */
.admin-layout .user-menu-dropdown {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    z-index: 9999 !important;
}

.admin-layout .user-menu-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

.admin-layout .user-menu-item {
    color: #374151 !important;
}

.admin-layout .user-menu-item:hover {
    background: #f1f5f9 !important;
}

.admin-layout .user-menu-item.logout-item {
    color: #ef4444 !important;
}

.admin-layout .user-menu-item.logout-item:hover {
    background: #fef2f2 !important;
}

/* ── TOP HEADER ── */
.admin-layout .top-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.admin-layout .admin-avatar {
    background: #3b82f6 !important;
    background-image: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.admin-layout .admin-info .admin-name {
    color: #1e293b !important;
    font-weight: 600 !important;
}

.admin-layout .admin-info .admin-role {
    color: #64748b !important;
}

/* Breadcrumb */
.admin-layout .breadcrumb-item {
    color: #6b7280 !important;
}

.admin-layout .breadcrumb-item.active {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

.admin-layout .breadcrumb-separator {
    color: #d1d5db !important;
}

/* ── PAGE TITLE ── */
.admin-layout .page-title,
.admin-layout .content-area h1,
.admin-layout .content-area h2 {
    color: #1e293b !important;
}

/* ── WIDGET ICON BACKGROUNDS ── */
.admin-layout .widget-icon {
    color: #ffffff !important;
}

.admin-layout .widget-icon.revenue {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.admin-layout .widget-icon.bookings {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

.admin-layout .widget-icon.occupancy {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.admin-layout .widget-icon.apartments {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}

.admin-layout .widget-value {
    color: #1e293b !important;
}

.admin-layout .widget-label {
    color: #6b7280 !important;
}

/* ── TABLE HEADER ── */
.admin-layout .table thead th,
.admin-layout table.table thead th,
.admin-layout .table th {
    background: #1e3a8a !important;
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    border-bottom: none !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 0.75rem 0.5rem !important;
    text-align: left !important;
}

.admin-layout .table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #374151 !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.85rem !important;
    background: inherit !important;
}

.admin-layout .table tbody tr {
    background: #ffffff;
}

.admin-layout .table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.admin-layout .table tbody tr:hover {
    background: #eff6ff !important;
}

/* ── BUTTONS — BASE ── */
.admin-layout .btn,
.admin-layout a.btn,
.admin-layout button.btn {
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

/* Primary — Blue */
.admin-layout .btn-primary {
    background: #3b82f6 !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

.admin-layout .btn-primary:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Secondary — Slate/Gray (used for Edit in apartments) */
.admin-layout .btn-secondary {
    background: #64748b !important;
    background-color: #64748b !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

.admin-layout .btn-secondary:hover {
    background: #475569 !important;
    background-color: #475569 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

/* Danger — Red (used for Delete everywhere) */
.admin-layout .btn-danger {
    background: #ef4444 !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.admin-layout .btn-danger:hover {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Success — Green (used for Print in guests) */
.admin-layout .btn-success {
    background: #10b981 !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.admin-layout .btn-success:hover {
    background: #059669 !important;
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Info — Teal/Cyan (used for View in bookings) */
.admin-layout .btn-info {
    background: #06b6d4 !important;
    background-color: #06b6d4 !important;
    color: #ffffff !important;
    border-color: #06b6d4 !important;
}

.admin-layout .btn-info:hover {
    background: #0891b2 !important;
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #ffffff !important;
}

/* Warning — Amber/Orange (used for Cancel in bookings) */
.admin-layout .btn-warning {
    background: #f59e0b !important;
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
}

.admin-layout .btn-warning:hover {
    background: #d97706 !important;
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

/* Logout button */
.admin-layout .logout-btn {
    background: #3b82f6 !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

.admin-layout .logout-btn:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* ── SELECT / DROPDOWN / INPUT BORDERS ── */
.admin-layout select,
.admin-layout .form-control,
.admin-layout input[type="text"],
.admin-layout input[type="email"],
.admin-layout input[type="password"],
.admin-layout input[type="number"],
.admin-layout input[type="date"],
.admin-layout input[type="datetime-local"],
.admin-layout input[type="tel"],
.admin-layout input[type="url"],
.admin-layout input[type="search"],
.admin-layout textarea {
    border: 1.5px solid #9ca3af !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    padding: 0.6rem 0.8rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
}

.admin-layout select:focus,
.admin-layout .form-control:focus,
.admin-layout input[type="text"]:focus,
.admin-layout input[type="email"]:focus,
.admin-layout input[type="password"]:focus,
.admin-layout input[type="number"]:focus,
.admin-layout input[type="date"]:focus,
.admin-layout input[type="datetime-local"]:focus,
.admin-layout input[type="tel"]:focus,
.admin-layout input[type="url"]:focus,
.admin-layout input[type="search"]:focus,
.admin-layout textarea:focus {
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15) !important;
    outline: none !important;
}

/* Select dropdown arrow styling */
.admin-layout select {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    cursor: pointer !important;
}

/* ── FILTER GROUPS (bookings, apartments, etc.) ── */
.admin-layout .filter-group label,
.admin-layout .form-group label {
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

/* ── SEARCH INPUT ── */
.admin-layout .search-input,
.admin-layout input[type="search"] {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

/* ── BULK ACTIONS DROPDOWN ── */
.admin-layout .bulk-dropdown-menu {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    background: #ffffff !important;
    border-radius: 8px !important;
}

.admin-layout .bulk-dropdown-menu button {
    color: #374151 !important;
}

.admin-layout .bulk-dropdown-menu button:hover {
    background: #f1f5f9 !important;
}

.admin-layout .three-dot-btn {
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    color: #374151 !important;
}

.admin-layout .three-dot-btn:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #9ca3af !important;
}

/* ── STATUS BADGES ── */
.admin-layout .status-badge {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    border-radius: 20px !important;
    padding: 0.25rem 0.75rem !important;
}

.admin-layout .status-confirmed,
.admin-layout .status-badge.confirmed {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

.admin-layout .status-pending,
.admin-layout .status-badge.pending {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
}

.admin-layout .status-cancelled,
.admin-layout .status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

.admin-layout .status-completed,
.admin-layout .status-badge.completed {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
}

.admin-layout .status-available,
.admin-layout .status-badge.available {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

.admin-layout .status-occupied,
.admin-layout .status-badge.occupied {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

.admin-layout .status-maintenance,
.admin-layout .status-badge.maintenance {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
}

/* ── MODAL STYLES ── */
.admin-layout .modal-content {
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.admin-layout .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.admin-layout .modal-header h2,
.admin-layout .modal-header h3,
.admin-layout .modal-header .modal-title {
    color: #1e293b !important;
}

.admin-layout .modal-close {
    color: #6b7280 !important;
}

.admin-layout .modal-close:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ── CARD TITLE ── */
.admin-layout .card-title {
    color: #1e293b !important;
}

.admin-layout .card-title::after {
    background: #3b82f6 !important;
}

/* ── SETTINGS TABS ── */
.admin-layout .settings-tab {
    color: #6b7280 !important;
    border-bottom: 2px solid transparent !important;
}

.admin-layout .settings-tab:hover {
    color: #3b82f6 !important;
}

.admin-layout .settings-tab.active {
    color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
    font-weight: 600 !important;
}

/* ── CHECKBOX STYLING ── */
.admin-layout input[type="checkbox"] {
    accent-color: #3b82f6 !important;
    border: 1px solid #d1d5db !important;
}

/* ── PAGINATION ── */
.admin-layout .pagination-btn {
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    color: #374151 !important;
}

.admin-layout .pagination-btn:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.admin-layout .pagination-btn.active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* ── LOGIN PAGE ── */
.login-page .login-card {
    border: 1px solid #e5e7eb !important;
}

.login-page .logo i {
    color: #f59e0b !important;
    font-size: 2.5rem !important;
}

.login-page .logo h1 {
    color: #1e3a8a !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
}

.login-page .login-header h2 {
    color: #1e293b !important;
    font-weight: 600 !important;
}

.login-page .login-header p {
    color: #64748b !important;
}

.login-page .form-group label {
    color: #1e293b !important;
    font-weight: 600 !important;
}

.login-page .forgot-password {
    color: #1e3a8a !important;
    font-weight: 600 !important;
}

.login-page .forgot-password:hover {
    color: #f59e0b !important;
}

.login-page .checkmark {
    border: 2px solid #1e3a8a !important;
    border-radius: 4px !important;
}

.login-page .remember-me input:checked + .checkmark {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

.login-page .login-btn,
.login-page .btn-primary {
    background: #1e3a8a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
}

.login-page .login-btn:hover,
.login-page .btn-primary:hover {
    background: #1e3070 !important;
}

.login-page input[type="email"],
.login-page input[type="password"],
.login-page input[type="text"] {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

.login-page input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* ── ACCESSIBILITY: FOCUS RING FIX ── */
.admin-layout .btn:focus,
.admin-layout .form-control:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

/* ── DROPDOWN DIVIDERS ── */
.admin-layout .dropdown-divider {
    background: #e5e7eb !important;
}

/* ── CONFIRM/DELETE MODAL BUTTONS ── */
.admin-layout .btn-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #d1d5db !important;
}

.admin-layout .btn-cancel:hover {
    background: #e2e8f0 !important;
}

.admin-layout .btn-delete,
.admin-layout .btn-confirm-delete {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
}

.admin-layout .btn-delete:hover,
.admin-layout .btn-confirm-delete:hover {
    background: #dc2626 !important;
}

.admin-layout .btn-confirm {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
}

.admin-layout .btn-confirm:hover {
    background: #2563eb !important;
}

/* ── DELETE/CONFIRM MODAL — icon, text, buttons ── */
/* Warning triangle icon — everywhere */
.admin-layout .fa-exclamation-triangle,
.confirm-modal-icon.warning i,
#deleteModal .fa-exclamation-triangle,
.custom-confirm-modal .fa-exclamation-triangle,
.confirm-modal-overlay .fa-exclamation-triangle {
    color: #f59e0b !important;
}

/* Warning icon circle background */
.confirm-modal-icon.warning {
    background: #fef3c7 !important;
}

/* Danger icon */
.confirm-modal-icon.danger {
    background: #fee2e2 !important;
}

.confirm-modal-icon.danger i {
    color: #ef4444 !important;
}

/* Modal heading text */
.admin-layout .modal .modal-title,
.admin-layout #deleteModal .modal-title,
.admin-layout .modal .modal-header h2,
.admin-layout .modal .modal-header h3,
.confirm-modal-header h3,
.confirm-modal-title {
    color: #1e293b !important;
    font-weight: 700 !important;
}

/* Modal message text */
.confirm-modal-message,
.admin-layout .modal p,
.admin-layout #deleteModal p {
    color: #374151 !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
}

/* Modal subtext */
.confirm-modal-subtext {
    color: #6b7280 !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
}

/* ── Cancel button — red bg white text (ALL modals) ── */
.admin-layout .btn-cancel,
.admin-layout #deleteModal .btn-cancel,
.admin-layout .confirm-modal-actions .btn-cancel,
.confirm-modal-actions .btn-cancel,
.modal-footer .btn-cancel,
.btn-cancel {
    background: #ef4444 !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.65rem 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.admin-layout .btn-cancel:hover,
.confirm-modal-actions .btn-cancel:hover,
.modal-footer .btn-cancel:hover,
.btn-cancel:hover {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* ── Delete/Danger button — solid red (ALL modals) ── */
.admin-layout .btn-delete,
.admin-layout .btn-confirm-delete,
.admin-layout #deleteModal .btn-delete,
.admin-layout .confirm-modal-actions .btn-delete,
.admin-layout .confirm-modal-actions .btn-danger,
.confirm-modal-actions .btn-delete,
.confirm-modal-actions .btn-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 2px solid #ef4444 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.65rem 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.admin-layout .btn-delete:hover,
.admin-layout .confirm-modal-actions .btn-delete:hover,
.admin-layout .confirm-modal-actions .btn-danger:hover,
.confirm-modal-actions .btn-delete:hover,
.confirm-modal-actions .btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* ── Confirm button — solid blue (for non-delete confirms) ── */
.admin-layout .btn-confirm,
.admin-layout .confirm-modal-actions .btn-confirm,
.confirm-modal-actions .btn-confirm {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: 2px solid #3b82f6 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.65rem 1.5rem !important;
    cursor: pointer !important;
}

.admin-layout .btn-confirm:hover,
.confirm-modal-actions .btn-confirm:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

/* ── Modal close (X) button ── */
.admin-layout .modal .modal-close,
.admin-layout .confirm-modal-close,
.confirm-modal-close {
    color: #6b7280 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

.admin-layout .modal .modal-close:hover,
.admin-layout .confirm-modal-close:hover,
.confirm-modal-close:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ── Modal content boxes ── */
.confirm-modal,
.custom-confirm-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
}

/* ── Confirm modal header ── */
.confirm-modal-header {
    border-bottom: 1px solid #e5e7eb !important;
}

/* ── Confirm modal actions spacing ── */
.confirm-modal-actions {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    padding: 0 1.5rem 1.5rem !important;
}

/* ── Base button colours (works outside .admin-layout too, e.g. modals) ── */
.btn-info {
    background: #06b6d4 !important;
    background-color: #06b6d4 !important;
    color: #ffffff !important;
    border-color: #06b6d4 !important;
}
.btn-info:hover {
    background: #0891b2 !important;
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #ffffff !important;
}
.btn-primary {
    background: #3b82f6 !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}
.btn-primary:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
.btn-danger {
    background: #ef4444 !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}
.btn-danger:hover {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}
.btn-success {
    background: #22c55e !important;
    background-color: #22c55e !important;
    color: #ffffff !important;
    border-color: #22c55e !important;
}
.btn-success:hover {
    background: #16a34a !important;
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

/* ── Modal table styling (for tables inside modals outside .admin-layout) ── */
.modal .table th,
.modal table thead th {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    border-bottom: none !important;
    white-space: nowrap !important;
}
.modal .table td {
    padding: 0.65rem 1rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 0.85rem !important;
    vertical-align: middle !important;
}
.modal .table tbody tr:nth-child(even) {
    background: rgba(30, 58, 138, 0.03) !important;
}
.modal .table tbody tr:hover {
    background: rgba(30, 58, 138, 0.06) !important;
}
.modal .table {
    width: 100% !important;
    border-collapse: collapse !important;
}

/* ── Final Price editable field border ── */
#customTotalPrice,
input#customTotalPrice,
input[type="number"]#customTotalPrice {
    border: 2px solid #1e3a8a !important;
    border-radius: 6px !important;
    outline: none !important;
    background: #ffffff !important;
}
#customTotalPrice:focus,
input#customTotalPrice:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* ── Input with icon — prevent text overlapping icon ── */
.admin-layout .input-with-icon {
    position: relative !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
}
.admin-layout .input-with-icon i {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--primary-blue) !important;
    font-size: 0.9rem !important;
    z-index: 2 !important;
    pointer-events: none !important;
}
.admin-layout .input-with-icon input,
.admin-layout .input-with-icon .form-control,
.admin-layout .input-with-icon input.form-control,
.input-with-icon input[type="text"],
.input-with-icon input[type="email"] {
    padding-left: 2.5rem !important;
}

/* ── Tables: horizontal scroll only on the table, not the whole page ── */
.admin-layout .table-container,
.admin-layout .table-responsive,
.admin-layout .card .table-responsive,
.admin-layout .card .table-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
}
.admin-layout .content-area {
    overflow-x: hidden !important;
}
.admin-layout .main-content {
    overflow-x: hidden !important;
}

/* =====================================================
   MOBILE FIXES — Tables, Modals, Popups, Layout
   ===================================================== */

/* ── TABLE CENTERING & MARGIN FIX (all pages) ── */
.admin-layout .card {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.admin-layout .content-area {
    box-sizing: border-box !important;
}

.admin-layout .table-container {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.admin-layout .table {
    width: 100% !important;
    margin: 0 auto !important;
}

/* ── MOBILE RESPONSIVE FIXES ── */
@media (max-width: 768px) {

    /* ── Content area padding fix ── */
    .admin-layout .content-area {
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Cards full width & centered ── */
    .admin-layout .card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.8rem !important;
    }

    /* ── Table container: remove right margin, center ── */
    .admin-layout .table-container,
    .admin-layout .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* ── Page title area fix ── */
    .admin-layout .content-area > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .admin-layout .content-area > div:first-child .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* ── Filter form grid single column ── */
    .admin-layout .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .admin-layout .form-group[style*="grid-column: span"] {
        grid-column: span 1 !important;
    }

    /* ── Dashboard widgets ── */
    .admin-layout .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    /* ── MODAL / POPUP FIX — FULL SCREEN ON MOBILE ── */
    .modal {
        padding: 0 !important;
        align-items: flex-start !important;
    }

    .modal .modal-content,
    .modal.show .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 1rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    /* ── Smaller modals (delete, confirm, status) ── */
    .modal .modal-content[style*="max-width: 400px"],
    #deleteModal .modal-content,
    #statusModal .modal-content,
    #customConfirmModal .custom-confirm-content {
        width: 92% !important;
        max-width: 92% !important;
        min-height: auto !important;
        max-height: 90vh !important;
        border-radius: 16px !important;
        margin: auto !important;
        padding: 1.2rem !important;
    }

    /* Fix delete/confirm modal parent alignment */
    #deleteModal,
    #statusModal {
        align-items: center !important;
        padding: 1rem !important;
    }

    /* ── Custom confirm modal fix ── */
    .custom-confirm-modal {
        padding: 1rem !important;
    }

    .custom-confirm-content {
        width: 92% !important;
        max-width: 92% !important;
        margin: auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* ── Modal form grid single column ── */
    .modal .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    /* ── Modal header ── */
    .modal .modal-header {
        position: sticky !important;
        top: 0 !important;
        background: #ffffff !important;
        z-index: 10 !important;
        padding-bottom: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    .modal .modal-title {
        font-size: 1.2rem !important;
    }

    /* ── Modal footer buttons ── */
    .modal .modal-footer,
    .modal [style*="justify-content: flex-end"] {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .modal .modal-footer .btn,
    .modal [style*="justify-content: flex-end"] .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* ── Confirm modal actions ── */
    .confirm-modal-actions {
        flex-direction: row !important;
        gap: 0.75rem !important;
        padding: 0 1rem 1rem !important;
    }

    .confirm-modal-actions .btn {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 0.7rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* ── Modal body padding fix ── */
    .confirm-modal-body {
        padding: 1.5rem 1rem !important;
    }

    .confirm-modal-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .confirm-modal-icon i {
        font-size: 2rem !important;
    }

    /* ── Booking details modal (Bootstrap) ── */
    .modal-dialog.modal-dialog-centered {
        margin: 0 !important;
        min-height: 100vh !important;
        max-width: 100% !important;
    }

    .modal-dialog.modal-dialog-centered .modal-content {
        border-radius: 0 !important;
        min-height: 100vh !important;
    }

    /* ── Discount section fix ── */
    .modal [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* ── Price calculation section ── */
    .modal .card[style*="background: var(--light-gray)"] {
        padding: 0.5rem !important;
    }

    /* ── Amenities grid fix ── */
    .modal [style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ── Discount radio buttons wrap ── */
    .modal [style*="display: flex; gap: 1rem;"] {
        flex-wrap: wrap !important;
    }

    /* ── Image upload area fix ── */
    .image-upload-area {
        padding: 1rem !important;
    }

    /* ── Top header Royal Apartments text ── */
    .top-header::before {
        font-size: 1rem !important;
    }

    /* ── Ensure sidebar opens above everything ── */
    .sidebar {
        z-index: 200 !important;
    }

    .sidebar-overlay {
        z-index: 199 !important;
    }

    /* ── Fix hamburger button z-index ── */
    .hamburger-menu {
        z-index: 201 !important;
    }
}

/* ── MOBILE SMALL (480px and below) ── */
@media (max-width: 480px) {

    /* ── Even smaller padding ── */
    .admin-layout .content-area {
        padding: 0.6rem !important;
    }

    .admin-layout .card {
        padding: 0.6rem !important;
    }

    /* ── Dashboard widgets single column ── */
    .admin-layout .dashboard-widgets {
        grid-template-columns: 1fr !important;
    }

    /* ── Modal tweaks for very small screens ── */
    .modal .modal-content {
        padding: 0.8rem !important;
    }

    .modal .modal-title {
        font-size: 1.1rem !important;
    }

    /* ── Confirm modal buttons stack horizontally still ── */
    .confirm-modal-actions {
        padding: 0 0.8rem 0.8rem !important;
    }

    /* ── Top header ── */
    .top-header::before {
        font-size: 0.9rem !important;
    }

    /* ── Amenities single column on very small ── */
    .modal [style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   HAMBURGER MENU — FINAL OVERRIDE (highest priority)
   Must be at very end of file to override everything
   ===================================================== */
@media (max-width: 768px) {
    .admin-layout .top-header .hamburger-menu,
    .top-header .hamburger-menu,
    button.hamburger-menu {
        display: flex !important;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
        background-color: #3b82f6 !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3) !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 8px !important;
        padding: 10px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        cursor: pointer !important;
        z-index: 201 !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        position: relative !important;
    }

    .admin-layout .top-header .hamburger-menu span,
    .top-header .hamburger-menu span,
    button.hamburger-menu span {
        width: 22px !important;
        height: 2.5px !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-radius: 2px !important;
        display: block !important;
        max-width: none !important;
        transition: all 0.3s ease !important;
    }

    .admin-layout .top-header .hamburger-menu.active,
    .top-header .hamburger-menu.active,
    button.hamburger-menu.active {
        background: #fbbf24 !important;
        background-color: #fbbf24 !important;
    }

    .admin-layout .top-header .hamburger-menu.active span,
    .top-header .hamburger-menu.active span,
    button.hamburger-menu.active span {
        background: #1e3a8a !important;
        background-color: #1e3a8a !important;
    }
}