/* Reset and Root Variables */
* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
:root {
    --primary-color: #7a0010; 
    --accent-color: #d4af37;  
    --bg-color: #f4f6f8;
    --text-color: #333;
    --card-bg: #ffffff;
}

html, body { 
    background-color: #e9ecef; 
    margin: 0; 
    padding: 0; 
    width: 100%;
    overflow-x: hidden; /* स्क्रीन को दाएं-बाएं हिलने से रोकेगा */
}

/* Mobile First Layout (स्मूथ और फिक्स) */
.mobile-wrapper { 
    width: 100%; 
    max-width: 450px; 
    height: 100dvh; 
    margin: 0 auto; /* मोबाइल में सेंटर रखने का सही तरीका */
    background: var(--bg-color); 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 0 15px rgba(0,0,0,0.1); 
    overflow-x: hidden;
}

/* Desktop View (कंप्यूटर पर खुलने के लिए) */
@media (min-width: 480px) { 
    body { display: flex; align-items: center; justify-content: center; min-height: 100vh; } 
    .mobile-wrapper { height: 95vh; border-radius: 20px; border: 1px solid #ddd; } 
}

/* Header */
.app-header { background-color: var(--primary-color); color: white; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; z-index: 10; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.header-text h1 { margin: 0; font-size: 18px; font-weight: bold; }
.header-text p { margin-top: 2px; margin-bottom: 0; font-size: 11px; color: #f8d7da; }
.header-logo { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--accent-color); object-fit: cover; background: white; }

/* Content Area */
.content-area { flex: 1; overflow-y: auto; padding: 15px; scrollbar-width: none; }
.content-area::-webkit-scrollbar { display: none; }

.page { display: none; animation: fadeIn 0.3s; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Form UI */
.tabs { display: flex; background: var(--card-bg); border-radius: 8px; margin-bottom: 15px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.tab { flex: 1; text-align: center; padding: 12px 0; font-size: 14px; font-weight: bold; color: #777; cursor: pointer; transition: 0.3s; border-bottom: 3px solid transparent; }
.tab.active { color: var(--primary-color); border-bottom: 3px solid var(--primary-color); background: #fdfdfd; }

.form-card { background: var(--card-bg); border-radius: 12px; padding: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 15px;}
.form-group { margin-bottom: 15px; width: 100%; }
.form-group label { display: block; font-size: 12px; color: #555; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { width: 100%; padding: 12px 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; background: #fafafa; transition: 0.3s; outline: none; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary-color); background: white; }

.row { display: flex; gap: 10px; width: 100%; }
.row .form-group { flex: 1; margin-bottom: 12px; }

.advanced-fields { display: none; background: #fffdf5; padding: 12px; border-radius: 8px; border: 1px dashed #d4af37; margin-bottom: 15px; }

.btn-submit { width: 100%; background: var(--primary-color); color: white; border: none; padding: 15px; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 5px; box-shadow: 0 4px 6px rgba(122,0,16,0.2); transition: 0.3s; }
.btn-submit:active { transform: scale(0.98); }

/* Progress Dashboard Stats */
.stat-box { flex: 1; background: var(--primary-color); color: white; padding: 15px; border-radius: 10px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.stat-box h2 { margin: 0; font-size: 22px; }
.stat-box p { margin-top: 5px; margin-bottom: 0; font-size: 11px; opacity: 0.8; }
.stat-box.golden { background: var(--accent-color); color: #000; }

/* Bottom Nav (Sticky Fix) */
.bottom-nav { 
    background: var(--card-bg); 
    display: flex; 
    justify-content: space-around; 
    padding: 12px 0 15px 0; 
    border-top: 1px solid #eee; 
    z-index: 10; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    position: sticky;
    bottom: 0;
    width: 100%;
}
.nav-item { text-align: center; color: #999; font-size: 10px; font-weight: bold; cursor: pointer; flex: 1; transition: 0.3s; }
.nav-item i { display: block; font-size: 20px; margin-bottom: 4px; }
.nav-item.active { color: var(--primary-color); }
.nav-item.active i { transform: translateY(-2px); }

/* Other Pages UI */
.room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.room-card { padding: 15px 10px; border-radius: 8px; text-align: center; font-weight: bold; color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.room-available { background: #2e7d32; } 
.room-booked { background: #c62828; } 
.room-card small { display: block; font-size: 10px; margin-top: 4px; font-weight: normal; }

.guest-card { background: white; padding: 15px; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 4px solid var(--primary-color); position: relative; }
.guest-info h4 { margin: 0 0 5px 0; font-size: 15px; }
.guest-info p { margin: 0 0 3px 0; font-size: 12px; color: #555; }
.btn-bill { position: absolute; right: 15px; top: 15px; background: var(--accent-color); color: #000; border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; }
.report-btn { display: block; width: 100%; background: #1976d2; color: white; text-align: center; padding: 14px; border-radius: 8px; text-decoration: none; margin-top: 15px; font-weight: bold; cursor: pointer; border: none; font-size: 15px; }

/* Print Bill Styling */
#printArea { display: none; }
@media print {
    body * { visibility: hidden; } 
    .mobile-wrapper { display: none; }
    #printArea, #printArea * { visibility: visible; }
    #printArea { display: block; position: absolute; left: 0; right: 0; top: 0; padding: 20px; color: black; }
    .bill-header { text-align: center; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 15px; }
    .bill-header img { width: 70px; }
    .bill-header h2 { margin: 5px 0; font-size: 24px; }
    .bill-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
    .bill-table th, .bill-table td { border: 1px solid #000; padding: 10px; text-align: left; font-size: 14px; }
    .signature-section { display: flex; justify-content: space-between; margin-top: 60px; padding: 0 20px; }
    .signature-box { text-align: center; }
    .signature-line { border-top: 1px solid #000; width: 150px; margin-bottom: 5px; }
}