/* PG Hostel Finder - Professional Business Design */
:root {
    --primary: #0f766e;
    --primary-dark: #0d9488;
    --primary-light: #14b8a6;
    --accent: #f59e0b;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-700: #334155;
    --gray-500: #64748b;
    --gray-300: #cbd5e1;
    --gray-100: #f1f5f9;
    --white: #ffffff;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-brand i { font-size: 1.75rem; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-menu a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover { color: var(--primary); }

.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem;
    min-width: 160px;
    list-style: none;
    margin-top: 4px;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.dropdown-menu a:hover { background: var(--gray-100); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-light:hover { background: var(--white); color: var(--primary); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }

/* Hero / Landing */
.landing-page .navbar-landing {
    background: transparent;
    box-shadow: none;
    position: absolute;
    width: 100%;
}

.navbar-landing .nav-menu a { color: var(--white); }
.navbar-landing .nav-brand { color: var(--white); }

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0d9488 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-title .highlight { color: var(--accent); }

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.hero-cta { margin-bottom: 2.5rem; }

.hero-search {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.search-input, .search-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Stats bar */
.stats-bar {
    background: var(--white);
    padding: 2rem;
    margin-top: -40px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--dark); }
.stat-label { font-size: 0.875rem; color: var(--gray-500); }

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(15, 118, 110, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.feature-card p { color: var(--gray-500); font-size: 0.95rem; }

/* How it works */
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.how-step {
    text-align: center;
}

.how-num {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 48px;
    margin-bottom: 1rem;
}

.how-step h3 { margin-bottom: 0.25rem; }
.how-step p { color: var(--gray-500); font-size: 0.9rem; }

/* Room cards */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.room-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.room-image {
    position: relative;
    height: 200px;
    background: var(--gray-300);
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-300), var(--gray-100));
    font-size: 3rem;
    color: var(--gray-500);
}

.room-placeholder-large {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-300);
    font-size: 5rem;
    color: var(--gray-500);
}

.room-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.room-type {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.room-body { padding: 1.25rem; }
.room-body h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.room-location { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 0.5rem; }
.room-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* CTA */
.cta-section { padding: 4rem 0; }
.cta-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    color: var(--white);
}

.cta-box h2 { margin-bottom: 0.5rem; }
.cta-box p { opacity: 0.9; margin-bottom: 1.5rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Auth pages */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, #e2e8f0 100%);
}

.auth-container { width: 100%; max-width: 440px; }

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.auth-card-wide { max-width: 560px; margin: 0 auto; }

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header p { color: var(--gray-500); }

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.6rem;
    text-align: center;
    background: var(--gray-100);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
}

.auth-tab.active {
    background: var(--primary);
    color: var(--white);
}

.auth-form .form-group { margin-bottom: 1.25rem; }
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
}

.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.forgot-link { font-size: 0.9rem; color: var(--primary); text-decoration: none; }

/* Forms */
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.page-header p { opacity: 0.9; }
.page-header-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* Search layout */
.search-layout .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .search-layout .container { grid-template-columns: 1fr; }
}

.search-sidebar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}

.search-sidebar h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.results-header { margin-bottom: 1rem; color: var(--gray-500); }

/* Room detail */
.room-detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
}

@media (max-width: 900px) {
    .room-detail-grid { grid-template-columns: 1fr; }
}

.room-detail-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.room-price-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
}

.room-specs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.room-specs span { color: var(--gray-600); }
.facilities-list, .room-description, .reviews-section { margin-bottom: 2rem; }
.facilities-list h4, .room-description h4, .reviews-section h4 { margin-bottom: 0.75rem; }

.facility-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.facility-tag {
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
}

.owner-card, .booking-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.owner-card h4, .booking-card h4 { margin-bottom: 1rem; }
.owner-name { font-weight: 600; margin-bottom: 0.5rem; }
.review-item {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.review-stars { color: var(--accent); }
.review-date { color: var(--gray-500); font-size: 0.85rem; }
.star-rating { display: flex; gap: 4px; }
.star-rating input { display: none; }
.star-rating label { cursor: pointer; color: var(--gray-300); }
.star-rating input:checked ~ label, .star-rating label:hover { color: var(--accent); }

/* Dashboard */
.dashboard-container { padding-bottom: 2rem; }
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dash-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dash-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dash-card h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.dash-card p { color: var(--gray-500); font-size: 0.9rem; }
.dash-card-highlight { border: 2px solid var(--warning); }
.dash-card-highlight i { color: var(--warning); }

.dashboard-section { margin-bottom: 2rem; }
.dashboard-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bookings-list { display: flex; flex-direction: column; gap: 1rem; }
.booking-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.booking-msg { font-style: italic; color: var(--gray-600); margin-top: 0.5rem; }
.booking-actions { display: flex; gap: 0.5rem; align-items: center; }

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: var(--gray-300); color: var(--gray-700); }

/* Tables */
.data-table, .admin-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td, .admin-table th, .admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th, .admin-table th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.875rem;
}

.bookings-table-wrapper { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Profile */
.profile-card, .form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
}

/* Owner rooms list */
.rooms-list-owner { display: flex; flex-direction: column; gap: 1rem; }
.room-item-owner {
    display: flex;
    gap: 1.5rem;
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.room-item-image {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}

.room-item-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.room-item-body { flex: 1; }
.room-item-body h3 { margin-bottom: 0.25rem; }
.room-item-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

.filter-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-tab {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
}

.filter-tab.active { background: var(--primary); color: var(--white); }

/* Utilities */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
}

.empty-state i { font-size: 4rem; color: var(--gray-300); margin-bottom: 1rem; }
.empty-state a { color: var(--primary); }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: var(--gray-300); text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 1rem; border-top: 1px solid var(--gray-700); font-size: 0.875rem; }

/* Mobile */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .nav-toggle { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .search-box { flex-direction: column; }
    .hero { padding-top: 100px; }
}
