* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.header-content {
    color: white;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.main-content {
    min-height: 500px;
}

.page,
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active,
.section.active {
    display: block;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.booking-form,
.manage-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.stats-container {
    margin-top: 40px;
}

.stats-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: #666;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.records-container {
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.records-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.records-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.records-table tbody tr {
    transition: all 0.3s ease;
}

.records-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.action-btn-confirm {
    background: #28a745;
    color: white;
}

.action-btn-cancel {
    background: #dc3545;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.no-records {
    text-align: center;
    padding: 60px;
    color: #999;
    font-size: 1.1rem;
}

.footer {
    text-align: center;
    padding: 30px;
    color: #666;
    margin-top: 40px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 30px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.toast-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-delay-1 {
    animation: fadeIn 0.6s ease 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.6s ease 0.4s forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

@media (max-width: 768px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 25px;
    }
    
    .nav {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
}

.login-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.login-modal.active .login-card {
    transform: translateY(0);
}

.login-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.login-form {
    width: 100%;
}

.nav-btn-logout {
    background: #dc3545;
    color: white;
}

.nav-btn-logout:hover {
    background: #c82333;
}

.remaining-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.remaining-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.remaining-label {
    font-size: 1.1rem;
    color: #555;
    font-weight: 600;
}

.remaining-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.remaining-unit {
    font-size: 1rem;
    color: #666;
}

.remaining-bar {
    background: white;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}

.remaining-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 100%;
}

.query-form {
    max-width: 400px;
    margin: 0 auto;
}

.query-results {
    margin-top: 30px;
}

.query-result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.query-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.query-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.query-result-date {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.query-result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.query-result-item {
    display: flex;
    flex-direction: column;
}

.query-result-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.query-result-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

.form-group-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.daily-setting-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.no-query-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}
