/* Admin Panel Styles - Royal Apartments */

/* Color Variables */
:root {
    --primary-blue: #1e3a8a;
    --royal-blue: #1e40af;
    --accent-gold: #fbbf24;
    --bright-gold: #f59e0b;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #6b7280;
    --charcoal: #333333;
    --border-light: #e5e7eb;
    --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;
}

.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);
    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 {
    border-top: 1px solid var(--border-light);
    padding: 0.75rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.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: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--medium-gray);
}

.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 {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

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

.table th {
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.table tbody tr:nth-child(even) {
    background: rgba(30, 58, 138, 0.02);
}

.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 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-large);
    animation: modalSlideIn 0.3s ease;
}

@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);
}

/* 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: 2px solid var(--border-light);
    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: var(--primary-blue);
    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;
    }

    /* 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: 1;
    pointer-events: none;
}

.input-with-icon input,
.input-with-icon .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;
}
