/* ==========================================================================
   GIBU RENTAL MARKETPLACE - GLOBAL FRAMEWORK & CORE THEME RESET
   ========================================================================== */
:root {
    --primary: #2563eb;          /* Gibu Corporate Blue */
    --primary-hover: #1d4ed8;
    --secondary: #4b5563;        /* Slate Gray */
    --secondary-hover: #111827;
    --success: #10b981;          /* Vibrant Green */
    --success-hover: #059669;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --warning: #eab308;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

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

/* Global Sticky Footer System */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
}

.main-content {
    flex: 1; /* Pushes the footer down if page content is short */
}

/* Unified Layout Containers */
.form-container, .auth-card, .inbox-container, .dashboard, .rooms-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-group,
.auth-card form p {
    margin-bottom: 1.25rem;
}

/* Update your existing label styles to catch them inside p tags */
.form-group label,
.auth-card form p label {
    display: block;
    font-weight: 600; /* Standardized uniform bold label weight */
    font-style: normal;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}


/* Interactive Input States */
.form-group input,
.form-group select,
.auth-card form p input { /* FIX: Added Django's generated input here */
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95rem;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.auth-card form p input:focus { /* FIX: Make sure the blue focus ring works here too */
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.auth-card {
    max-width: 450px;
    margin: 4rem auto; /* Increased top margin for more breathing room */
    padding: 3rem;     /* Added more internal padding */
    background: var(--surface);
    border-radius: 16px; /* Slightly softer corners */
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* Slightly deeper shadow for 'pop' */
}

/* Update your form paragraph styling */
.auth-card p {
    margin-bottom: 1.5rem;
}

/* Give the inputs a little more height and padding */
.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.auth-card .forgot-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.auth-card .forgot-links a {
    color: var(--primary);
    text-decoration: none;
}

/* Credentials Recovery Modules Layout */
.auth-recovery-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-recovery-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.auth-recovery-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}


/* Green Action Overrides specific to Registration Form workflow */
.btn-register {
    background: #059669;
}

.btn-register:hover {
    background: #047857;
}

/* Error Validations & Pipelines */
.errorlist {
    color: #dc2626;
    font-size: 0.85rem;
    margin: 0.35rem 0 0 0;
    padding-left: 1.25rem;
    font-weight: 500;
}

/* FIX: Added clean overrides for Django's nested help lists */
.helptext {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.helptext ul {
    margin: 0.25rem 0 0 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}


/* Account Setup Footer Link Aggregations */
.footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.footer-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

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


h1, h2, h3 {
    color: #111827;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

.form-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Flash Messages Alert Box */
.alert {
    padding: 1rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}



/* Hero Section */
.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh; /*  Takes up most of the screen height */
    text-align: center;
    padding: 3rem 1rem;

}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827; /* Dark text for contrast */
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Button Layout */
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ==========================================================================
   UNIFIED NAVBAR & STICKY FOOTER
   ========================================================================== */
/* Update your 'nav' section */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px); /* Modern 'glass' effect */
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 2rem; /* Reduced height, kept horizontal padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Subtle depth */
}
.nav-toggle {
    display: none; /* Hide on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800; /* Bolder logo */
    letter-spacing: -0.5px; /* Tighter, more modern tracking */
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem; /* Increased spacing for a premium feel */
}

.nav-links .nav-link {
    font-size: 0.95rem;
    color: #4b5563; /* Slightly softer than pure black */
}

.welcome-msg {
    color: var(--secondary);
    font-size: 0.95rem;
}

.nav-links .nav-link, .nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-links .nav-link:hover, .nav-links a:hover {
    color: #111827;
}

/* Overrides secondary button inside the navbar specifically */
/* Refine the secondary button inside the navbar */
.nav-links .btn-secondary {
    background-color: #2563eb; /* A cleaner, more modern blue */
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px; /* Fully rounded 'pill' shape */
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.nav-links .btn-secondary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px); /* Slight lift on hover */
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.nav-messages {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.global-unread-badge {
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9999px;
    padding: 0 0.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Logout button looks better as a subtle secondary link */
.logout-btn {
    background: none;
    border: none;
    color: #4b5563; /* Matches your standard nav link color */
    cursor: pointer;
    font-size: 1rem; /* Aligns with standard text scale */
    font-weight: 500; /* Matches your navigation font weights perfectly */
    text-decoration: none; /* Strips away that default browser underline */
    padding: 0;
    margin: 0;
    font-family: inherit;
    transition: color 0.15s ease-in-out;
}

.logout-btn:hover {
    color: #ef4444; /* A clean, modern muted red (Tailwind's red-500) */
}

/* Global Footer */
.global-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.footer-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.btn, .btn-primary, .btn-secondary, .btn-nav, .btn-send, .btn-send-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary, .btn, .btn-send {
    background: var(--primary);
    color: white !important;
}
.btn-primary:hover, .btn:hover, .btn-send:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--success);
    color: white !important;
}
.btn-secondary:hover {
    background: var(--success-hover);
}

.btn-nav {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    font-weight: 500;
}
.btn-nav:hover {
    background-color: #f3f4f6;
    color: #111827;
    border-color: #9ca3af;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
.btn-approve { background: var(--success); color: white !important; }
.btn-approve:hover { background: var(--success-hover); }
.btn-deny { background: var(--danger); color: white !important; }
.btn-deny:hover { background: var(--danger-hover); }
.text-completed {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.action-link-btn {
    text-decoration: none;
    color: #4f46e5;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.action-link-btn:hover {
    text-decoration: underline;
}

.edit-details-link {
    color: #2563eb;
    font-weight: 500;
}
.relist-link {
    font-size: 0.85rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.relist-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   MARKETPLACE ROOM CARDS & FILTERS (rooms.html & room_detail.html)
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fallback for room-card structural styling */

/* 2. Elevate the Room Cards */
.room-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px; /* Smoother corners */
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.room-card-img, .room-card-no-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}
.room-card-no-img {
    background: #e2e8f0;
}

.room-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.room-card-title, .card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.room-card-meta, .location {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

/* 3. Enhance Price and Action Buttons */
.room-card-price {
    font-weight: 700;
    font-size: 1rem;
    color: #2563eb; /* Primary brand color */
}

.btn-edit-inline {
    text-decoration: none;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.room-card-footer {
    display: flex;
    justify-content: space-between; /* Pushes price left, CTA wrapper right */
    align-items: flex-start;        /* Keeps them aligned top-to-top */
}

.cta-wrapper {
    display: flex;
    flex-direction: column;         /* Stacks button and text */
    align-items: flex-end;          /* Aligns everything to the right */
}

.cta-subtext {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    text-align: center;              /* Ensures text is right-aligned in the stack */
}


/* Adjust the button padding to fit the smaller body*/
.room-card-footer .btn-primary {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    text-decoration: none;
    width: fit-content;
    background-color: #4f46e5;
     display: flex;
     align-items: center;
     gap: 4px;"
}


.no-results {
    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;      /* Centers horizontally inside the flex container */
    justify-content: center;  /* Centers vertically if needed */
    text-align: center;       /* Centers the text elements */

    /* Spacing & Sizing */
    margin: 2rem auto;        /* 'auto' centers the div in its parent */
    padding: 3rem;
    max-width: 600px;         /* Prevents it from stretching the full width */

    /* Decoration */
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.no-results h3 {
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.score-rating {
    color: #d97706; /* Nice warm gold for stars */
}

.star-icon { color: #d97706; }
.rating-count { color: #9ca3af; font-weight: 400; }

/* room_detail.html*/

.section-heading {
    font-size: 1.5rem;
    color: #111827;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

/* 1. Gallery Grid - Responsive & Polished */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-frame {
    background: #f3f4f6; /* Subtle background color while image loads */
    border-radius: 12px;
    overflow: hidden; /* Ensures the image doesn't bleed out of the rounded corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.gallery-frame:hover {
    transform: scale(1.02); /* Very subtle zoom effect */
}

.gallery-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}


/* 2. Manager Info Section */
.manager-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-weight: 500;
}

.manager-profile-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}



/* 3. Action Wrapper (The 'Unlock Messaging' area) */
.action-button-wrapper {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 2.5rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.btn-landlord-inbox {
    padding: 1rem 2rem; /* Larger than other buttons */
    font-size: 1.1rem;
    width: 100%; /* Full width on mobile */
    max-width: 300px;
}

.review-comment-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.review-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.review-scores-strip {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Style for all alert banners */
.alert-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

/* Specific styling for your success messages */
.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* Align the content inside */
.alert-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #065f46;
}

/* 1. The Full-Screen Dark Overlay */
.modal-overlay {
    display: none; /* Remains hidden until triggered */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker, more professional */
    z-index: 9999;
    justify-content: center; /* This centers the box horizontally */
    align-items: center;     /* This centers the box vertically */
}

/* 2. The Clean White Card */
.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
}

/* 3. Text & Button Spacing */
.modal-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #111827;
}

.modal-content p {
    color: #4b5563;
    margin: 1rem 0 2rem 0;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verification-note {
    margin-bottom: 1rem;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
}

/* Search filter dashboard element */
/* Ensure the filter box isn't too narrow */
.search-filter-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-budget-width {
    max-width: 150px; /* Limits the width of the budget input specifically */
}

.search-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 150px;
}

.filter-input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
}

.filter-input-group input, .filter-input-group select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Style the button container to sit nicely */
.filter-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
}

/* ==========================================================================
   REAL-TIME MESSAGING CHAT WINDOW (chat.html & inbox.html)
   ========================================================================== */
.chat-container {
    max-width: 720px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 75vh;
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-title { margin: 0; color: var(--text-main); font-size: 1.15rem; font-weight: 600; }
.chat-header-subtitle { margin: 2px 0 0 0; font-size: 0.85rem; color: var(--text-muted); }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
    gap: 0.75rem;
}

.chat-bubble {
    max-width: 65%;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.925rem;
    line-height: 1.45;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.chat-bubble.me {
    background: var(--primary);
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.chat-bubble.them {
    background: #ffffff;
    color: #1e293b;
    margin-right: auto;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border);
}

.chat-meta {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.chat-link {
    color: #2563eb;
    margin-top: 4px;
}
.chat-bubble.them .chat-meta strong { color: #475569; font-weight: 600; }
.chat-bubble.them .chat-meta span { color: #94a3b8; }
.chat-bubble.me .chat-meta strong { color: #ffffff; font-weight: 600; }
.chat-bubble.me .chat-meta span { color: rgba(255, 255, 255, 0.85); }

.chat-message-content { word-break: break-word; }

.system-message-alert {
    text-align: center;
    margin: 0.75rem 0;
    color: #475569;
    font-style: italic;
    font-size: 0.8rem;
    width: 100%;
}
.system-message-alert span {
    background: #e2e8f0;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #cbd5e1;
}

.chat-footer { padding: 1rem; border-top: 1px solid var(--border); background: #ffffff; }
.chat-form { display: flex; gap: 0.75rem; align-items: flex-end; width: 100%; }
#chat-input-container { flex: 1; }

#chat-input-container textarea, #chat-input-container input {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 120px;
    padding: 0.65rem 0.85rem;
    font-size: 0.925rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

/* Inbox Thread Lists layout framework */
.thread-list { display: flex; flex-direction: column; gap: 0.75rem; }
.thread-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease-in-out;
}
.thread-card:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    transform: translateY(-1px);
}

.unread-thread {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0;
    border-left: 4px solid var(--success);
    padding-left: calc(1.5rem - 3px);
}
.unread-thread .partner-name { font-weight: 700; color: #0f172a; }
.unread-thread .last-message-snippet { color: #1e293b; font-weight: 500; }

.thread-left { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 0; max-width: 75%; }
.thread-meta { display: flex; align-items: center; gap: 0.75rem; }
.partner-name { font-weight: 700; color: #111827; font-size: 1.05rem; }
.room-tag { background: #f1f5f9; color: #475569; font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 500; border: 1px solid var(--border); }
.last-message-snippet { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.thread-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; margin-left: 1.5rem; }
.msg-time { color: #94a3b8; font-size: 0.8rem; white-space: nowrap; }
.unread-badge { background: var(--success); color: #ffffff; font-size: 0.75rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }

.inbox-empty-card {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #ffffff;
    border: 1px dashed var(--border);
    border-radius: 12px;
    margin-top: 1rem;
}

.inbox-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.inbox-empty-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}


/* ==========================================================================
   DASHBOARDS & DYNAMIC STATUS PANELS (landlord_dashboard.html)
   ========================================================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.premium-status-tracker {
    width: 100%;
    padding: 20px;
    border-radius: 12px;
    margin: 1rem 0 2rem 0;
}
.status-premium-active { background-color: #f0fdf4; border: 1px solid #bbf7d0; }
.status-premium-inactive { background-color: #fef2f2; border: 1px solid #fee2e2; }

.premium-tracker-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.status-title { margin: 0 0 6px 0; color: #1e293b; font-size: 1.15rem; font-weight: 600; }
.status-description { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.days-left-badge {
    background: var(--primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 85px;
}
.days-number { font-size: 1.5rem; display: block; line-height: 1.2; font-weight: 700; }
.days-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; opacity: 0.9; }

.btn-renew {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--danger);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}
.btn-renew:hover { background-color: var(--danger-hover); }

.dashboard-section-title { border-bottom: 2px solid #e5e7eb; padding-bottom: 0.5rem; margin-top: 2rem; color: #111827; }
.dashboard-card-section { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; }


/* Status Badges Workflow */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-denied { background: #fee2e2; color: #991b1b; }


/* Responsive Data Tables */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #f3f4f6; color: #374151; font-weight: 600; font-size: 0.9rem; padding: 12px 16px; }
.data-table td { padding: 16px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }

.listing-status-container { display: flex; flex-direction: column; gap: 4px; }
.status-listed { color: var(--success); font-weight: 600; font-size: 0.9rem; }
.status-subtext { color: #94a3b8; font-size: 0.85rem; }
.status-leased { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* ==========================================================================
   DJANGO FORMS & RESPONSIVE BREAKPOINTS
   ========================================================================== */
.form-container p { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; }
.form-container label { font-weight: 500; font-size: 0.9rem; color: #374151; }
.form-container input[type="text"], .form-container input[type="number"], .form-container textarea, .form-container select {
    width: 100%; padding: 0.5rem 0.75rem; font-size: 0.95rem; border: 1px solid #d1d5db; border-radius: 6px; outline: none; box-sizing: border-box;
}

/* Tablet & Mobile Layout Shifts */
@media (max-width: 900px) {
    nav { flex-direction: column; align-items: flex-start; padding: 1rem; gap: 0.75rem; }
    .nav-links { white-space: normal; flex-wrap: wrap; width: 100%; gap: 1rem; align-items: center; }
    .welcome-msg { width: 100%; margin-bottom: 0.25rem; }
}

@media (max-width: 640px) {

/* 1. Force the nav bar to stay a single row */
    nav {
        display: flex;
        flex-direction: row;     /* Keeps logo and button on same line */
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;

        /* Clear transparency effect */
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
    }

    /* 2. Position the toggle button on the right */
/* 2. Toggle button placement */
    .nav-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }

    .logo {
        order: 1;
        margin-right: auto;
    }

    /* 3. Style the dropdown list items */
/* Ensure the dropdown list doesn't disrupt the header bar */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95); /* Slightly more opaque for readability */
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: none; /* Default hidden */
        flex-direction: column;
        z-index: 999;
    }

    /* Show when active */
    .nav-links.active {
        display: flex !important;
    }

    /* 4. Format each item as a list row */
    .nav-links > * {
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
        text-align: center; /* Centers text in the row */
        display: block;
    }

    /* Ensure buttons inside the list look good */
    .nav-links .btn-secondary, .nav-links .btn-primary {
        margin: 0.5rem auto;
        display: inline-block;
    }


/* Add this inside your @media (max-width: 640px) block */
.nav-links > *:hover {
    background-color: #f9fafb; /* Soft light gray hover */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Ensure the hover doesn't fight with the button styles */
.nav-links .btn-secondary:hover {
    background-color: #1d4ed8; /* Keeps your primary blue hover */
}


.data-table th, .data-table td {
        white-space: nowrap; /* Keeps data on one line */
        padding: 12px;       /* Slightly tighter padding for mobile */
    }

    .hero-actions {
        flex-direction: column;
    }

    /* Apply consistent padding to all your main containers */

    .hero-container,
    .form-container,
    .auth-card,
    .inbox-container,
    .chat-container,
    .dashboard,
    .rooms-container {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: auto !important;        /* Prevents the card from hitting the edges */
    }
    .footer-container { flex-direction: column-reverse; gap: 0.75rem; text-align: center; }
    .footer-links { justify-content: center; }
    .thread-card { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .thread-right { flex-direction: row-reverse; justify-content: space-between; align-items: center; width: 100%; margin-left: 0; padding-top: 0.5rem; border-top: 1px dashed #e2e8f0; }
    .thread-meta { flex-wrap: wrap; gap: 0.5rem; }
}