/* HouseHunt - Main Stylesheet */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;

    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #06b6d4;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: 150ms ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
}

p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main {
    min-height: calc(100vh - 64px - 60px);
    padding: 20px;
}

.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }

.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.flex-grow { flex-grow: 1; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.logo:hover { text-decoration: none; }

.logo svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--gray-900);
    background: var(--gray-100);
    text-decoration: none;
}

.nav-link svg { width: 18px; height: 18px; }

.nav-user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.user-menu-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.user-menu-btn .user-name {
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.user-menu-btn svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.user-menu-btn.active svg {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 100;
}

.user-dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.dropdown-form {
    margin: 0;
}

.mobile-menu-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .nav {
        gap: 0.5rem;
    }
    .nav .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn svg {
    width: 16px;
    height: 16px;
}

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

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

.btn-outline {
    background: white;
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

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

.btn-danger-ghost:hover {
    background: #fef2f2;
}

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

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.card h3 svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--gray-900);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.is-invalid {
    border-color: var(--danger);
}

.form-input::placeholder {
    color: var(--gray-400);
}

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

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

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.form-actions-right {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.form-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section-title:first-child {
    margin-top: 0;
}

/* ==========================================================================
   Alerts / Flash Messages
   ========================================================================== */
.flash-messages {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.5;
}

.alert-close:hover { opacity: 1; }
.alert-close svg { width: 16px; height: 16px; }

/* ==========================================================================
   Page Headers
   ========================================================================== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--gray-600);
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.back-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.back-link svg { width: 14px; height: 14px; }

/* ==========================================================================
   Auth Pages
   ========================================================================== */
.auth-page {
    min-height: calc(100vh - 64px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 900px;
    width: 100%;
}

.auth-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-info h2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    letter-spacing: -1px;
    color: var(--gray-900);
}

.auth-info h2 span {
    color: var(--primary);
}

.auth-info > p {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.auth-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.auth-card > p {
    color: var(--gray-500);
    margin: 0 0 2rem 0;
    font-size: 0.9375rem;
}

/* Fancy input styles */
.fancy-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.fancy-input-group svg.lucide {
    position: absolute;
    left: 1rem;
    top: calc(50% + 12px);
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    transition: color 0.2s;
    pointer-events: none;
    z-index: 1;
}

.fancy-input-group:focus-within svg.lucide {
    color: var(--primary);
}

.fancy-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.fancy-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

.fancy-input:hover {
    border-color: var(--gray-300);
}

.fancy-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.fancy-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
}

.fancy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.fancy-btn svg.lucide {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 420px;
        gap: 2rem;
    }

    .auth-info {
        order: -1;
        text-align: center;
    }

    .auth-info h2 {
        font-size: 2rem;
    }

    .auth-info > p {
        font-size: 1rem;
    }
}

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

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-600);
    margin: 0;
}

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

.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

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

.auth-link a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.auth-footer p { margin: 0; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.hero .btn-primary:hover {
    background: var(--gray-100);
}

.hero .btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: white;
    background: transparent;
}

.hero .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    margin: 0 auto 1rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.9375rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
    padding: 4rem 0;
    text-align: center;
    background: var(--gray-900);
    color: white;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Boards
   ========================================================================== */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.board-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.board-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.board-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.board-card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.board-card-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.board-card-desc {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
    flex: 1;
}

.board-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.board-card-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ==========================================================================
   Board Header
   ========================================================================== */
.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 100;
}

.board-header-left {
    min-width: 0;
}

.board-header-left .page-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-header-actions {
    display: flex;
    gap: 0.5rem;
}

.add-property-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.toolbar-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.filters-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toolbar-bar .form-select,
.filters-bar .form-select {
    width: auto;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.filter-count {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ==========================================================================
   Property List
   ========================================================================== */
.property-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-card {
    display: flex;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.property-card-image {
    width: 200px;
    min-height: 150px;
    flex-shrink: 0;
}

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

.property-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-400);
}

.property-card-placeholder svg {
    width: 48px;
    height: 48px;
}

/* Source link placeholder (Zillow, Redfin, etc.) */
a.source-link,
.property-card-placeholder.source-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s;
    background: var(--gray-100) !important;
    color: inherit;
}
a.source-link:hover,
.property-card-placeholder.source-link:hover {
    background: var(--gray-200) !important;
}
.source-link .source-logo {
    width: 48px !important;
    height: 48px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: white !important;
}
.source-link .source-logo.zillow {
    background: #006aff !important;
}
.source-link .source-logo.redfin {
    background: #a02021 !important;
}
.source-link .source-logo.realtor {
    background: #d92228 !important;
}
.source-link .source-name {
    font-size: 0.75rem !important;
    color: var(--gray-600) !important;
    font-weight: 500 !important;
}

.property-card-body {
    flex: 1;
    padding: 1rem 1.25rem;
    min-width: 0;
}

.property-card-address {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    display: block;
}

.property-card-address:hover {
    color: var(--primary);
    text-decoration: none;
}

.property-card-location {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0 0 0.5rem;
}

.property-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.property-card-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.property-card-monthly {
    font-size: 0.8125rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

.property-card-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem;
    gap: 0.25rem;
}

@media (max-width: 640px) {
    .property-card {
        flex-direction: column;
    }
    .property-card-image {
        width: 100%;
        height: 180px;
    }
}

/* ==========================================================================
   Property Detail
   ========================================================================== */
.property-detail {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
}

.property-detail.no-sidebar {
    grid-template-columns: 1fr;
}

.property-detail.no-sidebar .property-detail-sidebar {
    display: none;
}

@media (max-width: 900px) {
    .property-detail {
        grid-template-columns: 1fr;
    }
}

.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 0.5rem;
}
.status-badge.status-active {
    background: var(--success-50, #ecfdf5);
    color: var(--success, #10b981);
}
.status-badge.status-pending {
    background: var(--warning-50, #fffbeb);
    color: var(--warning, #f59e0b);
}
.status-badge.status-closed,
.status-badge.status-rejected {
    background: var(--gray-100);
    color: var(--gray-600);
}
.status-badge.status-archived {
    background: var(--gray-200);
    color: var(--gray-500);
}

.inline-form {
    display: inline;
}

.property-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.property-photo {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.property-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.property-address {
    font-size: 1.5rem;
}

.property-location {
    color: var(--gray-600);
    margin: 0;
}

.property-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.property-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.property-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.detail-value {
    font-weight: 500;
}

.status-active { color: var(--success); }
.status-pending { color: var(--warning); }
.status-sold { color: var(--danger); }
.status-archived, .status-rejected { color: var(--gray-400); }

.property-notes {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
}

.property-notes h3 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.property-notes p { margin: 0; }

/* ==========================================================================
   Loan Calculator
   ========================================================================== */
.loan-calculator .loan-total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.loan-total span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-500);
}

.loan-breakdown,
.loan-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loan-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.loan-item.highlight {
    font-weight: 600;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
}

.loan-calculator hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1rem 0;
}

.loan-params {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    margin: 1rem 0 0;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-section {
    margin-top: 1.5rem;
}

.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    flex: 1;
    min-height: 60px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.comment-badge {
    background: var(--primary);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.comment-date {
    color: var(--gray-400);
    margin-left: auto;
}

.comment-body {
    margin: 0;
    font-size: 0.9375rem;
}

/* ==========================================================================
   Tags
   ========================================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: var(--tag-color, var(--gray-200));
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.tag-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-checkbox {
    cursor: pointer;
}

.tag-checkbox input {
    display: none;
}

.tag-checkbox input:checked + .tag {
    box-shadow: 0 0 0 2px var(--gray-900);
}

/* ==========================================================================
   Dropdown
   ========================================================================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 0.5rem 0;
    z-index: 10000;
    display: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--gray-500);
}

.text-warning {
    color: var(--warning);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: var(--gray-400);
}

.empty-state h2 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}
