* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f5f5;
            padding: 10px;
        }
        .container {
            max-width: 900px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 10px;
            font-size: 1.5rem;
        }
        
        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 20px 0 15px 0;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 8px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .nav-btn {
            background: #4CAF50;
            color: white;
            border: none;
            padding: 12px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: background 0.3s;
            flex: 1;
            min-width: 90px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        .nav-btn:hover {
            background: #45a049;
        }
        .nav-btn:active {
            transform: scale(0.98);
        }
        .nav-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
        }
        .current-month {
            font-size: 1.3rem;
            font-weight: bold;
            color: #333;
            width: 100%;
            text-align: center;
            margin-bottom: 5px;
        }
        
        .calendar {
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
        }
        .weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            background: #4CAF50;
        }
        .weekday {
            padding: 10px 4px;
            text-align: center;
            font-weight: bold;
            color: white;
            font-size: 0.8rem;
        }
        .days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 1px;
            background: #e0e0e0;
        }
        .day {
            background: white;
            padding: 8px 4px;
            text-align: center;
            min-height: 60px;
            cursor: default;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        .day-number {
            font-size: 0.95rem;
            font-weight: 500;
            margin-bottom: 3px;
        }
        .day.other-month {
            background: #fafafa;
            color: #ccc;
        }
        .day.today {
            background: #e3f2fd;
        }
        .day.today .day-number {
            color: #1976d2;
            font-weight: bold;
        }
        .day.weekend {
            background: #e8f5e9;
            cursor: pointer;
            transition: all 0.2s;
        }
        .day.weekend:active {
            background: #c8e6c9;
            transform: scale(0.98);
        }
        .day.weekend.occupied {
            background: #ffcdd2;
            cursor: not-allowed !important;
        }
        .day.weekend.occupied:active {
            transform: none;
            background: #ffcdd2;
        }
        .day.weekend.pending {
            background: #fff9c4;
            cursor: not-allowed !important;
        }
        .day.weekend.pending:active {
            transform: none;
            background: #fff9c4;
        }
        .weekend-label {
            font-size: 0.6rem;
            color: white;
            margin-top: 3px;
            padding: 2px 4px;
            border-radius: 3px;
            font-weight: bold;
            display: inline-block;
            line-height: 1.2;
        }
        .weekend-label.available {
            background: #2e7d32;
            border: 1px solid #1b5e20;
        }
        .weekend-label.occupied {
            background: #c62828;
            border: 1px solid #b71c1c;
        }
        .weekend-label.pending {
            background: #f57c00;
            border: 1px solid #e65100;
        }
        .weekend-label.note {
            background: #757575;
            border: 1px solid #616161;
            font-size: 0.55rem !important;
        }
        .day.occupied {
            background: #e0e0e0;
            cursor: not-allowed;
        }
        
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .modal-content {
            background: white;
            margin: 20px auto;
            padding: 25px 20px;
            width: 95%;
            max-width: 600px;
            border-radius: 10px;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
        }
        .close {
            position: absolute;
            right: 15px;
            top: 10px;
            font-size: 32px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
            line-height: 1;
            padding: 5px 10px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        .close:hover,
        .close:active {
            color: #000;
        }
        .modal h2 {
            margin-bottom: 10px;
            font-size: 1.3rem;
        }
        .form-group {
            margin-bottom: 18px;
        }
        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: bold;
            color: #333;
            font-size: 0.95rem;
        }
        .form-group small {
            display: block;
            margin-top: 4px;
            font-size: 0.8rem;
        }
        .form-group select,
        .selectbox {
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            background: white;
            width: 100%;
            margin-bottom: 8px;
            touch-action: manipulation;
        }
        .form-group input[type="text"],
        .form-group input[type="tel"],
        .form-group input[type="email"],
        .form-group input[type="number"],
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            touch-action: manipulation;
        }
        .form-group textarea {
            resize: vertical;
            min-height: 80px;
            font-family: inherit;
        }
        .form-group input[type="number"] {
            -moz-appearance: textfield;
        }
        .form-group input[type="number"]::-webkit-outer-spin-button,
        .form-group input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .bank-label {
            margin-bottom: 8px;
        }
        .form-group input[name="bank_reg"] {
            width: 30%;
            display: inline-block;
            margin-right: 2%;
        }
        .form-group input[name="bank_account"] {
            width: 68%;
            display: inline-block;
        }
        .btn {
            background: #4CAF50;
            color: white;
            padding: 16px 30px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.1rem;
            font-weight: bold;
            width: 100%;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        .btn:active {
            background: #45a049;
            transform: scale(0.98);
        }
        .legend {
            margin-top: 15px;
            padding: 12px;
            background: #f9f9f9;
            border-radius: 5px;
            font-size: 0.9rem;
        }
        .legend strong {
            display: block;
            margin-bottom: 8px;
        }
        .legend-item {
            display: block;
            margin-bottom: 8px;
        }
        .legend-color {
            display: inline-block;
            width: 18px;
            height: 18px;
            margin-right: 8px;
            vertical-align: middle;
            border: 1px solid #ddd;
            border-radius: 3px;
        }
        .success-message {
            background: #d4edda;
            color: #155724;
            padding: 15px;
            border-radius: 5px;
            margin-bottom: 15px;
            display: none;
            font-size: 0.95rem;
        }
        .footer { 
            text-align: center; 
            padding: 15px; 
            color: #666; 
            font-size: 0.75rem; 
        }

        /* Desktop styles */
        @media (min-width: 768px) {
            body {
                padding: 20px;
            }
            .container {
                padding: 30px;
            }
            h1 {
                font-size: 2rem;
            }
            .current-month {
                font-size: 1.5rem;
                width: auto;
                margin-bottom: 0;
            }
            .calendar-header {
                flex-wrap: nowrap;
                padding: 15px;
            }
            .nav-btn {
                flex: 0 1 auto;
                min-width: 120px;
            }
            .weekday {
                padding: 12px;
                font-size: 0.95rem;
            }
            .day {
                padding: 15px 10px;
                min-height: 80px;
            }
            .day-number {
                font-size: 1.1rem;
            }
            .weekend-label {
                font-size: 0.65rem;
                padding: 3px 6px;
            }
            .weekend-label.note {
                font-size: 0.6rem !important;
            }
            .day.weekend:hover {
                background: #c8e6c9;
                transform: scale(1.02);
                box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            }
            .modal-content {
                margin: 50px auto;
                padding: 30px;
            }
            .legend-item {
                display: inline-block;
                margin-right: 20px;
            }
        }

        /* Large mobile landscape */
        @media (min-width: 600px) and (max-width: 767px) {
            .day {
                min-height: 70px;
                padding: 10px 6px;
            }
            .day-number {
                font-size: 1rem;
            }
        }

        /* Small mobile */
        @media (max-width: 374px) {
            h1 {
                font-size: 1.2rem;
            }
            .nav-btn {
                font-size: 0.85rem;
                padding: 10px 12px;
            }
            .current-month {
                font-size: 1.1rem;
            }
            .weekday {
                font-size: 0.7rem;
                padding: 8px 2px;
            }
            .day {
                min-height: 55px;
                padding: 6px 2px;
            }
            .day-number {
                font-size: 0.85rem;
            }
            .weekend-label {
                font-size: 0.5rem;
            }
        }