/* =====================================================
   KOST EDO - PUBLIC STYLESHEET
   Design: Mobile-First, Glassmorphism, Elegant
   Font: Google 'Outfit'
   ===================================================== */

/* --- Design Tokens (CSS Variables) --- */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #d4af37;
    --accent-hover: #b8962c;
    --bg: #f8fafc;
    --text-main: #1e293b;
    --text-light: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --white: #ffffff;
    --border: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Mode Tokens --- */
:root[data-theme="dark"] {
    --bg: #0f172a;
    --text-main: #f8fafc;
    --text-light: #94a3b8;
    --white: #1e293b;
    --border: #334155;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #020617;
}

:root[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Dark Mode Overrides --- */
:root[data-theme="dark"] .text-muted {
    color: var(--text-light) !important;
}

:root[data-theme="dark"] .btn-primary-dark {
    background: var(--accent);
    color: #0f172a;
}

:root[data-theme="dark"] .btn-primary-dark:hover {
    background: var(--accent-hover);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

:root[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) brightness(2);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Glassmorphism Navbar --- */
.navbar-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-glass .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.navbar-glass .navbar-brand span {
    color: var(--accent);
}

.navbar-glass .nav-link {
    color: var(--text-main);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.08);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(30, 41, 59, 0.75) 100%
    ), url('/images/hero-bg.png') center/cover no-repeat fixed;
    color: #ffffff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(212, 175, 55, 0.1) 0%,
        transparent 70%
    );
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeUp 1s ease-out;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.2;
    color: #ffffff;
}

.hero-content p {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Buttons --- */
.btn-accent {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary-dark {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-dark:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.3);
}

.btn-disabled {
    background: #cbd5e1;
    color: #94a3b8;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1rem;
}

.section-title .accent-line {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* --- Kamar Card --- */
.kamar-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kamar-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.kamar-card .card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.kamar-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.kamar-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.kamar-card .badge-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tersedia {
    background: rgba(16, 185, 129, 0.9);
    color: var(--white);
}

.badge-terisi {
    background: rgba(239, 68, 68, 0.9);
    color: var(--white);
}

.kamar-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kamar-card .room-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.kamar-card .room-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.kamar-card .room-price small {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.8rem;
}

.kamar-card .room-facilities {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    flex: 1;
}

.kamar-card .room-facilities li {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.2rem 0;
}

.kamar-card .room-facilities li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

/* --- Glassmorphism Form Card --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    padding: 2rem;
}

.glass-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.glass-card .form-label {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.glass-card .form-control,
.glass-card .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.glass-card .form-control:focus,
.glass-card .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    outline: none;
}

/* --- Alerts & Modals --- */
.modal-glass .modal-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
}

.alert-success-custom {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
}

.alert-danger-custom {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
}

/* --- Footer --- */
.footer-public {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 4rem;
}

.footer-public strong {
    color: var(--accent);
}

/* --- Responsive --- */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 767.98px) {
    .glass-card {
        padding: 1.25rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }
}

/* --- Toggle PIN / Password Button --- */
.toggle-pin, .toggle-password {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #475569 !important;
    border: 1.5px solid #e2e8f0 !important;
    opacity: 1 !important;
}

.toggle-pin:hover, .toggle-password:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
}

:root[data-theme="dark"] .toggle-pin,
:root[data-theme="dark"] .toggle-password {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #475569 !important;
    border: 1.5px solid #e2e8f0 !important;
}

:root[data-theme="dark"] .toggle-pin:hover,
:root[data-theme="dark"] .toggle-password:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
}
