@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 8px;
    --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);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* HEADER */
.header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}

.navbar { display: flex; align-items: center; gap: 8px; }

.nav-link {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: all 0.2s;
}

.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); font-weight: 600; }

.nav-link-btn {
    padding: 8px 20px;
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--border-radius);
    font-weight: 600;
}
.nav-link-btn:hover { background: var(--primary-dark); color: #fff !important; }

.user-menu { position: relative; }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--gray-200);
    font-size: 0.85rem;
}

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

.user-dropdown.show { display: block; }

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.user-dropdown-header strong { display: block; font-size: 0.9rem; }
.user-dropdown-header span { font-size: 0.8rem; color: var(--gray-500); }

.user-dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: background 0.15s;
}

.user-dropdown-item:hover { background: var(--gray-50); color: var(--primary); }
.user-dropdown-item.danger:hover { background: #fef2f2; color: var(--danger); }
.user-dropdown-divider { border: none; border-top: 1px solid var(--gray-100); margin: 0; }

/* SEARCH BAR */
.search-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 32px 0;
    color: #fff;
}

.search-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 8px;
}

.search-tab {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
}

.search-tab.active {
    background: var(--primary);
    color: #fff;
}

.search-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }

.form-group { display: flex; flex-direction: column; gap: 4px; }

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    width: 100%;
    background: #fff;
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control { cursor: pointer; }

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ALERTS */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid var(--success); }
.alert-danger { background: #fef2f2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid var(--warning); }
.alert-info { background: #f0f9ff; color: #075985; border-left: 4px solid var(--info); }

/* SECTION */
.section { padding: 48px 0; }
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title a { font-size: 0.875rem; font-weight: 500; color: var(--primary); }

/* PROPERTY GRID */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.property-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--gray-100);
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.property-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--gray-200);
}

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

.property-card:hover .property-card-image img { transform: scale(1.05); }

.property-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--primary); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }

.property-card-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gray-400);
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.property-card-favorite:hover, .property-card-favorite.saved {
    background: var(--danger);
    color: #fff;
}

.property-card-body { padding: 16px; }

.property-card-category {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.property-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-title:hover { color: var(--primary); }

.property-card-location {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-card-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 12px;
}

.property-card-meta {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    font-size: 0.8rem;
    color: var(--gray-500);
}

.property-card-meta span { display: flex; align-items: center; gap: 4px; }

/* FEATURED SECTION */
.featured-section {
    background: linear-gradient(to bottom, var(--gray-50), #fff);
    padding: 48px 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* CATEGORIES */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.category-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-card i { font-size: 2rem; color: var(--primary); margin-bottom: 8px; display: block; }
.category-card h4 { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.category-card span { font-size: 0.75rem; color: var(--gray-400); }

/* ABOUT MR TOA (in footer) */
.footer-about-toa {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 12px;
}

.footer-toa-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fbbf24;
    flex-shrink: 0;
}

.footer-toa-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.footer-toa-info strong {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-toa-info span {
    color: var(--gray-400);
    font-size: 0.78rem;
}

.footer-toa-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.footer-toa-list li {
    position: relative;
    padding: 5px 0 5px 22px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--gray-400);
}

.footer-toa-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 5px;
    color: #fbbf24;
    font-size: 0.85rem;
}

/* FOOTER */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--gray-400); font-size: 0.875rem; transition: color 0.2s; }
.footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* AUTH PAGES */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 50%, var(--primary-light) 100%);
    padding: 24px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 32px;
    text-align: center;
    color: #fff;
}

.auth-card-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.auth-card-header p { opacity: 0.8; font-size: 0.9rem; }

.auth-card-body { padding: 32px; }

.auth-card-footer {
    text-align: center;
    padding: 16px 32px 24px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.auth-card-footer a { color: var(--primary); font-weight: 500; }

/* FORM AUTH */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--gray-700); }

/* PROPERTY DETAIL */
.detail-header { padding: 32px 0; background: #fff; border-bottom: 1px solid var(--gray-200); }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--gray-300); }

.detail-title { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.detail-meta { display: flex; gap: 20px; color: var(--gray-500); font-size: 0.875rem; }
.detail-meta span { display: flex; align-items: center; gap: 4px; }

.detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; padding: 32px 0; }

.detail-gallery { margin-bottom: 24px; }
.detail-gallery-main {
    border-radius: 12px;
    overflow: hidden;
    height: 420px;
    background: var(--gray-200);
    margin-bottom: 12px;
}

.detail-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.detail-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.detail-gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.detail-gallery-thumb.active, .detail-gallery-thumb:hover { border-color: var(--primary); }
.detail-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-content { background: #fff; border-radius: 12px; padding: 24px; border: 1px solid var(--gray-200); margin-bottom: 24px; }
.detail-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--gray-900); }
.detail-content p { color: var(--gray-600); line-height: 1.8; margin-bottom: 12px; }

.detail-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--gray-100);
}

.spec-item i { color: var(--primary); font-size: 1.25rem; margin-bottom: 4px; }
.spec-item strong { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.spec-item span { font-size: 0.75rem; color: var(--gray-500); }

/* CONTACT CARD */
.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 80px;
}

.contact-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.agent-info h4 { font-size: 0.95rem; font-weight: 600; }
.agent-info span { font-size: 0.8rem; color: var(--gray-500); }

.contact-form .form-group { margin-bottom: 12px; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 32px; }
.pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0 8px;
}

.pagination a { background: #fff; border: 1px solid var(--gray-200); color: var(--gray-600); }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.pagination .disabled { opacity: 0.5; cursor: not-allowed; }

/* HERO SECTION */
.hero-section {
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.7) 100%),
        url('../images/header.png') center / cover no-repeat;
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.hero-section h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.hero-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; }

/* STATS BAR */
.stats-bar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-item span { font-size: 0.8rem; color: var(--gray-500); }

/* FILTERS */
.filter-bar {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-row .form-group { min-width: 160px; margin-bottom: 0; }

/* SIDEBAR */
.sidebar { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid var(--gray-200); margin-bottom: 24px; }
.sidebar h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--gray-100); }

/* MOBILE */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 4px; }

@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .search-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .navbar { display: none; }
    .navbar.show { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--gray-200); padding: 16px; box-shadow: var(--shadow-lg); }
    .search-form { grid-template-columns: 1fr; }
    .property-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-section h1 { font-size: 1.75rem; }
}

/* UTILITY */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.d-flex { display: flex; } .gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.align-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state i { font-size: 3rem; margin-bottom: 16px; color: var(--gray-300); }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* Image placeholder */
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-400);
    font-size: 2rem;
}

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; }
.tab { padding: 12px 24px; font-weight: 500; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Table */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { background: var(--gray-50); padding: 12px 16px; text-align: left; font-weight: 600; color: var(--gray-600); border-bottom: 2px solid var(--gray-100); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.data-table tr:hover { background: var(--gray-50); }

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}

/* Related properties */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Sort bar */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.sort-bar-info { font-size: 0.875rem; color: var(--gray-500); }

/* Toast notification (giữa màn hình, tự tắt) */
.toast-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 16px;
}

.toast-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.toast-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 460px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.12),
        0 10px 10px -5px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(-30px) scale(0.85);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    overflow: hidden;
}

.toast-overlay.show .toast-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-overlay.closing .toast-box {
    transform: translateY(-15px) scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Progress bar đếm ngược phía dưới */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.35;
    transform-origin: left center;
    animation: toast-progress 1.5s linear forwards;
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Icon trong vòng tròn gradient */
.toast-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.45;
}

.toast-close {
    background: var(--gray-100);
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    transform: rotate(90deg);
}

.toast-success { color: var(--success); }
.toast-success .toast-icon { background: linear-gradient(135deg, #34d399, #059669); }
.toast-success .toast-progress { color: var(--success); }

.toast-danger { color: var(--danger); }
.toast-danger .toast-icon { background: linear-gradient(135deg, #f87171, #dc2626); }
.toast-danger .toast-progress { color: var(--danger); }

.toast-warning { color: var(--warning); }
.toast-warning .toast-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }
.toast-warning .toast-progress { color: var(--warning); }

.toast-info { color: var(--info); }
.toast-info .toast-icon { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.toast-info .toast-progress { color: var(--info); }

@media (max-width: 480px) {
    .toast-box { min-width: 0; width: 100%; padding: 14px 16px; gap: 12px; }
    .toast-icon { width: 38px; height: 38px; font-size: 1.2rem; }
    .toast-message { font-size: 0.9rem; }
}
