/* ============================================
   MiCasa — Global Stylesheet
   Palette: VRBO-inspired blue & navy
   ============================================ */

:root {
    --color-slate:        #0E214B;
    --color-slate-light:  #4a6180;
    --color-slate-lighter:#7b93ad;
    --color-sage:         #245ABC;
    --color-sage-light:   #328EEE;
    --color-sage-dark:    #0E214B;
    --color-cream:        #F5F7FA;
    --color-cream-dark:   #EBF0F5;
    --color-amber:        #245ABC;
    --color-amber-light:  #EBF2FF;
    --color-white:        #ffffff;
    --color-border:       #D6DEE8;
    --color-danger:       #c42b1c;
    --color-danger-light: #fde8e5;
    --color-success:      #16a34a;
    --color-success-light:#e3f5eb;
    --color-pending:      #fef3c7;
    --color-pending-text: #92400e;

    /* Extended palette */
    --color-verde:        #245ABC;
    --color-verde-light:  #EBF2FF;
    --color-terracotta:   #E86024;
    --color-terracotta-light: #fef0e6;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 28px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-cream);
    color: var(--color-slate);
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================
   LAYOUT
   ============================================ */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    width: 100%;
}

.content-wrapper-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    width: 100%;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav,
.main-nav {
    background: var(--color-slate);
    color: var(--color-white);
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(14,33,75,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-brand span {
    color: #7bb3f0;
}

.nav-brand i {
    color: var(--color-amber);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 0.45rem 0.875rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
}

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

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
}

.nav-user strong {
    color: var(--color-white);
}

.nav-logout {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.nav-logout:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    font-size: 0.8125rem;
    color: var(--color-slate-light);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--color-amber);
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs .separator {
    margin: 0 0.35rem;
    color: var(--color-slate-lighter);
}

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

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-slate);
    margin: 0;
    letter-spacing: -0.5px;
}

.page-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-slate);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-amber);
    color: var(--color-white);
}
.btn-primary:hover { background: #1d4ea6; }

.btn-secondary {
    background: var(--color-cream-dark);
    color: var(--color-slate);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-border); }

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

.btn-slate {
    background: var(--color-slate);
    color: var(--color-white);
}
.btn-slate:hover { background: #091836; }

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
}

/* Soft action buttons (for table rows) */
.action-btn {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    background: none;
    font-family: inherit;
    transition: all 0.2s;
}
.action-btn-view    { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.action-btn-view:hover { background: #e2e8f0; color: #334155; }
.action-btn-edit    { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.action-btn-edit:hover { background: #bfdbfe; }
.action-btn-approve { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.action-btn-approve:hover { background: #bbf7d0; }
.action-btn-decline { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.action-btn-decline:hover { background: #fde68a; }
.action-btn-delete  { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.action-btn-delete:hover { background: #fecaca; }

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-slate);
    margin-bottom: 0.375rem;
}

.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-white);
    color: var(--color-slate);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-amber);
    box-shadow: 0 0 0 3px rgba(36,90,188,0.1);
}

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

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-slate-light);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

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

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-slate);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-cream);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Property card */
.property-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
    display: block;
}
.property-card:hover {
    box-shadow: 0 8px 24px rgba(14,33,75,0.12);
    transform: translateY(-3px);
}

.property-card-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--color-cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card-photo-placeholder {
    color: var(--color-slate-lighter);
    font-size: 3rem;
}

.property-card-body {
    padding: 1rem 1.125rem;
}

.property-card-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-slate);
    margin: 0 0 0.25rem;
    letter-spacing: -0.3px;
}

.property-card-location {
    font-size: 0.8125rem;
    color: var(--color-slate-light);
    margin: 0 0 0.75rem;
}

.property-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--color-slate-light);
}

.property-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Property grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1024px) { .property-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .property-grid { grid-template-columns: 1fr; } }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success   { background: var(--color-success-light); color: var(--color-success); }
.badge-warning   { background: var(--color-pending); color: #92400e; }
.badge-danger    { background: var(--color-danger-light); color: var(--color-danger); }
.badge-muted     { background: #f1f5f9; color: #64748b; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-sage      { background: #d1fae5; color: var(--color-sage-dark); }
.badge-pending   { background: #fef3c7; color: #b45309; }
.badge-active    { background: #dcfce7; color: #16a34a; }
.badge-inactive  { background: #f1f5f9; color: #64748b; }
.badge-rejected  { background: #fee2e2; color: #dc2626; }

/* ============================================
   TABLES
   ============================================ */
.data-table-container {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0 0 12px 12px;
    overflow-x: auto;
    margin-top: -1px;
}

.dm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    table-layout: auto;
}

.dm-table th {
    background: #f0f3f8;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-slate-light);
    border-bottom: 2px solid var(--color-border);
    text-align: left;
    white-space: nowrap;
}

.dm-table th.sortable { cursor: pointer; }
.dm-table th.sortable:hover { background: #dde4ed; color: var(--color-slate); }
.dm-table th.sorted { background: #dbeafe; color: #2563eb; }
.sort-icon { margin-left: 0.5rem; font-size: 0.875rem; }

.dm-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: #334155;
    vertical-align: middle;
}

.dm-table tr:last-child td { border-bottom: none; }
.dm-table tr:hover { background: #f0f3f8; }
.dm-table tr.selected { background: #eff6ff; }

.col-checkbox { width: 40px; text-align: center; }
.col-actions { width: 1%; white-space: nowrap; }

.action-buttons { display: flex; gap: 0.375rem; align-items: center; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-row.bottom {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-top: -1px;
}

.pagination-info {
    font-size: 0.8125rem;
    color: var(--color-slate-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-info strong { color: var(--color-slate); }

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-controls button {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.6rem;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--color-slate);
    transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--color-cream-dark);
}

.pagination-controls button:disabled { opacity: 0.4; cursor: not-allowed; }

.page-num {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-slate);
}

.per-page-select {
    border: 1px solid var(--color-border);
    border-radius: 100px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-slate);
    background: var(--color-white);
}

/* ============================================
   BULK ACTIONS BAR
   ============================================ */
.bulk-actions-bar {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}
.bulk-actions-bar.show { display: flex; }
.bulk-actions-bar .selected-count { font-weight: 600; color: #1e40af; font-size: 0.8125rem; }
.bulk-btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
}
.bulk-btn-approve { background: #dcfce7; color: #16a34a; }
.bulk-btn-approve:hover { background: #bbf7d0; }
.bulk-btn-decline { background: #fef3c7; color: #d97706; }
.bulk-btn-decline:hover { background: #fde68a; }
.bulk-btn-delete { background: #fee2e2; color: #dc2626; }
.bulk-btn-delete:hover { background: #fecaca; }
.bulk-btn-cancel { background: #f1f5f9; color: #475569; }
.bulk-btn-cancel:hover { background: #e2e8f0; }

/* ============================================
   MODALS (.micasa-modal)
   ============================================ */
.micasa-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.micasa-modal.show { display: flex; }

.micasa-modal-content {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.micasa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.micasa-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-slate);
    letter-spacing: -0.3px;
}

.micasa-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 0;
}
.micasa-modal-close:hover { color: var(--color-slate); }

.micasa-modal-body { padding: 1.5rem; }

.micasa-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* Alert modal (showAlert) */
#micasa-alert-modal .micasa-modal-content { max-width: 400px; }
#micasa-confirm-modal .micasa-modal-content { max-width: 440px; }
#micasa-alert-msg, #micasa-confirm-msg { color: var(--color-slate-light); font-size: 0.9375rem; }

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flash-success { background: var(--color-success-light); color: var(--color-success); border: 1px solid #bbf7d0; }
.flash-error   { background: var(--color-danger-light); color: var(--color-danger); border: 1px solid #fecaca; }
.flash-warning { background: var(--color-pending); color: var(--color-pending-text); border: 1px solid #fde68a; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================
   CONTROL PANEL (filter bars)
   ============================================ */
.control-panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.control-left, .control-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.control-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.control-group label {
    font-size: 0.8125rem;
    color: var(--color-slate-light);
    white-space: nowrap;
}
.control-group select, .control-group input {
    font-size: 0.8125rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    color: var(--color-slate);
    background: var(--color-white);
}

/* ============================================
   STAT CARDS (dashboard)
   ============================================ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.stat-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-slate-light);
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-slate);
}
.stat-card-sub {
    font-size: 0.75rem;
    color: var(--color-slate-light);
    margin-top: 0.25rem;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-wrap { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--border-radius); overflow: hidden; }
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-cream-dark);
    border-bottom: 1px solid var(--color-border);
}
.calendar-header h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--color-slate); }
.calendar-nav { background: none; border: 1px solid var(--color-border); border-radius: 100px; padding: 0.3rem 0.7rem; cursor: pointer; font-size: 0.875rem; color: var(--color-slate); transition: all 0.2s; }
.calendar-nav:hover { background: var(--color-border); }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day-label {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-slate-light);
    text-transform: uppercase;
    background: #f0f3f8;
    border-bottom: 1px solid var(--color-border);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px;
    margin: 2px;
    transition: all 0.15s;
    position: relative;
}
.calendar-day:hover:not(.blocked):not(.empty) { background: var(--color-sage-light); color: var(--color-white); }
.calendar-day.empty { cursor: default; }
.calendar-day.today { font-weight: 700; color: var(--color-amber); }
.calendar-day.past { color: var(--color-slate-lighter); cursor: default; }
.calendar-day.available { background: var(--color-cream); }
.calendar-day.blocked { background: #e2e8f0; color: var(--color-slate-lighter); cursor: not-allowed; text-decoration: line-through; }
.calendar-day.pending { background: var(--color-pending); color: var(--color-pending-text); cursor: default; }
.calendar-day.confirmed { background: #d1fae5; color: var(--color-sage-dark); cursor: default; }
.calendar-day.selected { background: var(--color-amber); color: var(--color-white); font-weight: 600; }
.calendar-day.in-range { background: rgba(36,90,188,0.12); }

.calendar-legend {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--color-slate-light); }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; }
.legend-dot.available { background: var(--color-cream); border: 1px solid var(--color-border); }
.legend-dot.blocked   { background: #e2e8f0; }
.legend-dot.pending   { background: var(--color-pending); }
.legend-dot.confirmed { background: #d1fae5; }
.legend-dot.selected  { background: var(--color-amber); }

/* ============================================
   TABS
   ============================================ */
.tabs { display: flex; border-bottom: 2px solid var(--color-border); margin-bottom: 1.5rem; gap: 0; }
.tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-slate-light);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.tab:hover { color: var(--color-slate); }
.tab.active { color: var(--color-amber); border-bottom-color: var(--color-amber); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================
   NOTIFICATIONS BELL
   ============================================ */
.notif-bell-wrap,
.notification-bell-wrapper { position: relative; }

.notif-bell,
.notif-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.75);
    font-size: 1.125rem;
    padding: 0.35rem;
    border-radius: 100px;
    transition: color 0.2s;
    position: relative;
}
.notif-bell:hover,
.notif-bell-btn:hover { color: var(--color-white); }

.notif-badge {
    position: absolute;
    top: -2px; right: -4px;
    background: var(--color-amber);
    color: var(--color-white);
    font-size: 0.625rem;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}
.notif-dropdown.show { display: block; }

.notif-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-slate);
    position: sticky;
    top: 0;
    background: var(--color-white);
}

.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--color-amber);
    padding: 0;
    font-family: inherit;
    font-weight: 600;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-dropdown-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.notif-dropdown-footer a {
    font-size: 0.8125rem;
    color: var(--color-amber);
    text-decoration: none;
    font-weight: 600;
}
.notif-dropdown-footer a:hover { text-decoration: underline; }

.notif-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-slate);
    transition: background 0.15s;
    font-size: 0.8125rem;
}
.notif-item:hover { background: var(--color-cream); }
.notif-item.unread { background: #f5f8fd; }
.notif-item-title { font-weight: 600; margin-bottom: 0.1rem; }
.notif-item-time { color: var(--color-slate-lighter); font-size: 0.75rem; }

/* ============================================
   USER DROPDOWN
   ============================================ */
.user-menu-wrapper { position: relative; }

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    padding: 0.3rem 0.5rem;
    border-radius: 100px;
    transition: background 0.2s;
    font-family: inherit;
    font-size: 0.875rem;
}
.user-menu-btn:hover { background: rgba(255,255,255,0.1); color: var(--color-white); }

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.25);
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-amber);
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.25);
}

.user-name { font-size: 0.875rem; font-weight: 500; }

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}
.user-dropdown.show { display: block; }

.user-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-slate);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--color-slate);
    text-decoration: none;
    transition: background 0.15s;
    border-bottom: 1px solid var(--color-border);
}
.user-dropdown-item:last-child { border-bottom: none; }
.user-dropdown-item:hover { background: var(--color-cream); }
.user-dropdown-item.logout { color: var(--color-danger); }
.user-dropdown-item.logout:hover { background: #fff5f5; }

/* Role badges in user dropdown */
.role-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: capitalize;
    background: #f1f5f9;
    color: #64748b;
}
.role-badge.role-admin  { background: #fee2e2; color: #dc2626; }
.role-badge.role-owner  { background: #EBF2FF; color: #245ABC; }
.role-badge.role-guest  { background: #dcfce7; color: #16a34a; }

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
@media (max-width: 768px) {
    .main-content { padding: 1.25rem 1rem; }
}

/* Flash message close button */
.flash {
    position: relative;
}
.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.flash-close:hover { opacity: 1; }

/* ============================================
   PHOTO GALLERY
   ============================================ */
.photo-gallery { position: relative; }
.gallery-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    background: var(--color-cream-dark);
}
.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--color-cream-dark);
    border-radius: 0 0 16px 16px;
    overflow-x: auto;
}
.gallery-thumb {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
    border: 2px solid transparent;
}
.gallery-thumb.active { opacity: 1; border-color: var(--color-amber); }
.gallery-thumb:hover { opacity: 0.9; }

/* ============================================
   STAR RATING
   ============================================ */
.star-rating { display: flex; gap: 0.125rem; }
.star { color: #fbbf24; font-size: 0.875rem; }
.star.empty { color: var(--color-border); }

/* ============================================
   AMENITY CHIPS
   ============================================ */
.amenity-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.amenity-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.875rem;
    background: var(--color-cream-dark);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.8125rem;
    color: var(--color-slate);
    font-weight: 500;
}

/* ============================================
   INFO HUB ITEMS
   ============================================ */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-white);
    margin-bottom: 0.75rem;
}
.info-item-icon {
    width: 36px;
    height: 36px;
    background: var(--color-cream-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-amber);
    font-size: 1rem;
    flex-shrink: 0;
}
.info-item-body { flex: 1; }
.info-item-title { font-weight: 700; font-size: 0.9375rem; margin: 0 0 0.25rem; }
.info-item-content { font-size: 0.875rem; color: var(--color-slate-light); white-space: pre-wrap; }

/* ============================================
   MESSAGE THREAD
   ============================================ */
.message-thread { display: flex; flex-direction: column; gap: 1rem; }
.message-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
}
.message-bubble.from-me {
    background: var(--color-amber);
    color: var(--color-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.message-bubble.from-other {
    background: var(--color-cream-dark);
    color: var(--color-slate);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.message-meta {
    font-size: 0.75rem;
    color: var(--color-slate-lighter);
    margin-top: 0.25rem;
    text-align: right;
}
.message-bubble.from-other + .message-meta { text-align: left; }

/* ============================================
   PENDING APPROVAL PAGE
   ============================================ */
.approval-card {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
}
.approval-icon { font-size: 3rem; color: var(--color-amber); margin-bottom: 1rem; }
.approval-card h1 { font-size: 1.375rem; font-weight: 700; color: var(--color-slate); margin: 0 0 0.75rem; }
.approval-card p { color: var(--color-slate-light); margin: 0 0 1rem; line-height: 1.6; }

/* ============================================
   AUTH PAGES (login/register)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream);
    padding: 1rem;
}
.auth-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-logo h1 {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--color-slate);
    margin: 0;
    letter-spacing: -0.5px;
}
.auth-logo h1 span { color: var(--color-amber); }
.auth-logo p { color: var(--color-slate-light); margin: 0.25rem 0 0; font-size: 0.875rem; }
.auth-card h2 { font-size: 1.125rem; color: var(--color-slate); margin: 0 0 1.25rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--color-slate-light); }
.auth-footer a { color: var(--color-amber); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================
   LANDING PAGE
   ============================================ */
.hero {
    background: var(--color-slate);
    color: var(--color-white);
    padding: 5rem 1rem;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin: 0 0 1rem; letter-spacing: -1px; }
.hero h1 span { color: var(--color-amber); }
.hero p { font-size: 1.125rem; color: rgba(255,255,255,0.75); max-width: 560px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features-section { padding: 4rem 1rem; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card { text-align: center; padding: 1.5rem; }
.feature-icon { font-size: 2.5rem; color: var(--color-amber); margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; color: var(--color-slate); margin: 0 0 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--color-slate-light); margin: 0; }

/* ============================================
   UTILITIES
   ============================================ */
.text-muted { color: var(--color-slate-light); }
.text-small { font-size: 0.8125rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
    .gallery-main { height: 240px; }
    .hero h1 { font-size: 1.75rem; }
    .content-wrapper { padding: 1rem 0.75rem; }
}
