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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Auth Section */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 100%;
}

.auth-box h1 {
    text-align: center;
    color: #2d6a4f;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.auth-box h2 {
    color: #2d6a4f;
    margin-bottom: 20px;
    font-size: 24px;
}

.auth-box input, .auth-box select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.auth-box button {
    width: 100%;
    padding: 12px;
    background: #2d6a4f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-box button:hover {
    background: #1b4332;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.switch-form a {
    color: #2d6a4f;
    text-decoration: none;
    font-weight: bold;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.header h1 {
    color: #2d6a4f;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 600;
    color: #2d6a4f;
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: white;
    border: 2px solid #2d6a4f;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Center Modal */
.notification-center {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.notification-modal {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.notification-header {
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    color: #2d6a4f;
    font-size: 22px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.no-notifications {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

.notification-item {
    background: #f8f9fa;
    border-left: 4px solid #2d6a4f;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.notification-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.notification-item.unread {
    background: #e8f5e9;
    border-left-color: #28a745;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-item h4 {
    color: #2d6a4f;
    font-size: 16px;
    margin: 0;
}

.notification-item-time {
    color: #6c757d;
    font-size: 12px;
}

.notification-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0;
}

.notification-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.notification-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
}

.mark-read-btn {
    background: #6c757d;
    color: white;
}

.mark-read-btn:hover {
    background: #5a6268;
}

.notification-footer {
    padding: 15px 20px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: center;
}

/* Notification Options */
.notification-options {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.notification-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.notification-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* User Management */
.users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2d6a4f;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.user-card h4 {
    color: #2d6a4f;
    margin: 0 0 5px 0;
    font-size: 18px;
}

.user-card .user-email {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.user-card .user-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.user-card .user-info-item {
    display: flex;
    flex-direction: column;
}

.user-card .user-info-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.user-card .user-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.user-card .badge-role {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-role.admin {
    background: #dc3545;
    color: white;
}

.badge-role.player {
    background: #28a745;
    color: white;
}

.user-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.user-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

.btn-edit {
    background: #ffc107;
    color: #000;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
}

.user-activity-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 5px;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.tab-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #2d6a4f;
    color: white;
}

/* Tab Content */
.tab-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h2 {
    color: #2d6a4f;
    margin-bottom: 25px;
    font-size: 22px;
}

.tab-pane h3 {
    color: #2d6a4f;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Forms */
.tab-pane form {
    max-width: 600px;
}

.tab-pane label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.tab-pane input, .tab-pane select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.tab-pane input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #2d6a4f;
    color: white;
}

.btn-primary:hover {
    background: #1b4332;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Filter Section */
.filter-section {
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section label {
    font-weight: 600;
    color: #333;
}

.filter-section input, .filter-section select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* Players List */
.players-list, .bookings-list, .groups-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.player-card, .booking-card, .group-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.player-card:hover, .booking-card:hover, .group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.player-card h4, .booking-card h4, .group-card h4 {
    color: #2d6a4f;
    margin-bottom: 10px;
    font-size: 16px;
}

.player-card p, .booking-card p, .group-card p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.player-card .badge, .booking-card .badge, .group-card .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.badge-pending {
    background: #ffc107;
    color: #000;
}

.badge-confirmed {
    background: #28a745;
    color: white;
}

.badge-cancelled {
    background: #dc3545;
    color: white;
}

.badge-walkin {
    background: #17a2b8;
    color: white;
}

/* Admin Section */
.admin-controls {
    margin-bottom: 30px;
}

.admin-bookings-list {
    margin-top: 25px;
}

.admin-bookings-list .player-card {
    cursor: pointer;
    border: 2px solid #e9ecef;
}

.admin-bookings-list .player-card.selected {
    border-color: #2d6a4f;
    background: #e8f5e9;
}

.admin-bookings-list .player-card input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
    cursor: pointer;
}

/* Group Creation */
.group-creation {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.selected-players {
    margin-bottom: 20px;
}

.selected-players .player-card {
    background: white;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.time-inputs label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.time-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.group-creation button {
    margin-right: 10px;
}

/* Walk-in Form */
.walkin-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.walkin-form h3 {
    color: #2d6a4f;
    margin-bottom: 15px;
}

.walkin-form input, .walkin-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
    max-width: 350px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .notification-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .notification-modal {
        max-width: 95%;
        max-height: 90vh;
    }

    .notification-item {
        padding: 12px;
    }

    .notification-actions {
        flex-direction: column;
    }

    .notification-actions button {
        width: 100%;
    }

    .nav-tabs {
        justify-content: center;
    }

    .tab-btn {
        font-size: 12px;
        padding: 10px 15px;
    }

    .players-list, .bookings-list, .groups-list {
        grid-template-columns: 1fr;
    }

    .time-inputs {
        grid-template-columns: 1fr;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-section input, .filter-section select {
        width: 100%;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 25px;
    }

    .header h1 {
        font-size: 20px;
    }

    .tab-pane {
        padding: 20px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button {
        width: 100%;
    }

    .group-creation button {
        width: 100%;
        margin: 5px 0;
    }
}
