/* =========================================================
   HOSTEL BOOKING — STYLE PRINCIPAL
   ========================================================= */

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

:root {
    --primary: #ff5a5f;
    --primary-dark: #e64a4f;
    --secondary: #00a699;
    --dark: #1f2933;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --bg: #fafafa;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 16px 32px rgba(0, 0, 0, 0.14);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { color: var(--dark); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-links a {
    font-weight: 500;
    color: var(--dark);
    transition: color .2s;
    position: relative;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 6px 16px rgba(255,90,95,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255,90,95,0.45); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--dark);
    color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: var(--white); }
.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}
.btn-secondary:hover { transform: translateY(-2px); }
.btn-danger { background: #ef4444; color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.notif-bell {
    position: relative;
    font-size: 1.3rem;
    cursor: pointer;
}
.notif-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------- HERO ---------------- */
.hero {
    background: linear-gradient(135deg, rgba(255,90,95,0.92), rgba(0,166,153,0.88)),
                url('https://images.unsplash.com/photo-1555854877-bab0e564b8d5?auto=format&fit=crop&w=1600&q=80') center/cover;
    color: white;
    padding: 100px 0 90px;
    text-align: center;
}
.hero h1 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 16px;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 32px;
}
.search-box {
    background: white;
    border-radius: 50px;
    padding: 8px;
    display: inline-flex;
    gap: 8px;
    box-shadow: var(--shadow);
    max-width: 480px;
    width: 100%;
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: inherit;
}
.search-box button {
    border-radius: 50px;
}

/* ---------------- SECTION TITLES ---------------- */
.section { padding: 64px 0; }
.section-title {
    text-align: center;
    margin-bottom: 12px;
    font-size: 2rem;
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 44px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------------- CARDS GRID ---------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-gray);
}
.card-body { padding: 20px; }
.card-title { font-size: 1.15rem; margin-bottom: 6px; }
.card-meta {
    color: var(--gray);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.card-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-tag {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}
.price-tag small { color: var(--gray); font-weight: 400; font-size: 0.78rem; }

/* ---------------- BADGES ---------------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: #fff3cd; color: #92740c; }
.badge-confirmed { background: #d1f5e0; color: #0a7a3e; }
.badge-refused { background: #fde2e1; color: #c0322a; }
.badge-cancelled { background: #e5e7eb; color: #4b5563; }
.badge-room-available { background: #d1f5e0; color: #0a7a3e; }
.badge-room-unavailable { background: #fde2e1; color: #c0322a; }

/* ---------------- DETAIL PAGES ---------------- */
.detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 36px;
}
.gallery {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    border-radius: var(--radius);
    overflow: hidden;
    height: 360px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main-img { grid-row: 1 / 3; }
.gallery-empty {
    height: 360px;
    background: var(--light-gray);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.info-block {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.info-block h3 { margin-bottom: 14px; }

.rooms-list { display: grid; gap: 20px; margin-top: 20px; }
.room-card {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s;
}
.room-card:hover { box-shadow: var(--shadow-hover); }
.room-card img { width: 220px; height: 160px; object-fit: cover; flex-shrink: 0; }
.room-card-body { padding: 18px 18px 18px 0; flex: 1; display: flex; flex-direction: column; }
.room-card-top { display: flex; justify-content: space-between; align-items: flex-start; }

/* ---------------- FORMS ---------------- */
.form-card {
    background: white;
    max-width: 460px;
    margin: 60px auto;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-card h2 { text-align: center; margin-bottom: 8px; }
.form-card .subtitle { text-align: center; color: var(--gray); margin-bottom: 28px; font-size: 0.9rem; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-footer-text { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--gray); }
.form-footer-text a { color: var(--primary); font-weight: 600; }

/* ---------------- ALERTS ---------------- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.92rem;
    font-weight: 500;
}
.alert-success { background: #d1f5e0; color: #0a7a3e; }
.alert-error { background: #fde2e1; color: #c0322a; }
.alert-info { background: #dbeafe; color: #1e4ea1; }

/* ---------------- BOOKING WIDGET ---------------- */
.booking-widget {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    position: sticky;
    top: 96px;
}
.booking-widget .price-big { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.booking-widget .price-big small { font-size: 0.85rem; color: var(--gray); font-weight: 500; }

/* ---------------- DASHBOARD / TABLE ---------------- */
.dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }
.dash-sidebar {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}
.dash-sidebar .avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.4rem; margin: 0 auto 12px;
}
.dash-sidebar h4 { text-align: center; margin-bottom: 4px; }
.dash-sidebar p { text-align: center; color: var(--gray); font-size: 0.85rem; margin-bottom: 20px; }
.dash-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
}
.dash-nav a:hover, .dash-nav a.active { background: var(--light-gray); color: var(--primary); }

.table-wrap { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--light-gray); }
th, td { padding: 14px 18px; text-align: left; font-size: 0.9rem; }
tbody tr { border-top: 1px solid #f1f1f1; }
tbody tr:hover { background: #fafafa; }

.notif-item {
    display: flex; gap: 14px; padding: 16px 18px;
    border-bottom: 1px solid #f1f1f1;
}
.notif-item.unread { background: #fff8f7; }
.notif-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--light-gray); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1rem;
}
.notif-text { flex: 1; }
.notif-time { color: var(--gray); font-size: 0.78rem; margin-top: 2px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

/* ---------------- FOOTER ---------------- */
footer {
    background: var(--dark);
    color: #d1d5db;
    padding: 50px 0 24px;
    margin-top: 60px;
}
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
footer h4 { color: white; margin-bottom: 14px; }
footer a { color: #d1d5db; }
footer a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 36px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 18px;
}

/* ---------------- MODAL ---------------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: white; border-radius: var(--radius); padding: 30px;
    max-width: 440px; width: 90%; box-shadow: var(--shadow-hover);
}
.modal-box h3 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 880px) {
    .dash-grid { grid-template-columns: 1fr; }
    .detail-header { flex-direction: column; }
}
@media (max-width: 720px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
    .gallery .main-img { grid-row: auto; height: 220px; }
    .gallery img { height: 140px; }
    .room-card { flex-direction: column; }
    .room-card img { width: 100%; height: 180px; }
    .room-card-body { padding: 18px; }
    .form-row { grid-template-columns: 1fr; }
}
