:root {
    --bg-1: #0f172a;
    --bg-2: #12213e;
    --bg-3: #1f3a68;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.3);
    --soft-border: rgba(255, 255, 255, 0.15);
    --text-main: #f8fbff;
    --text-soft: #d3deef;
    --shadow-main: 0 20px 45px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 20px rgba(10, 20, 40, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    direction: rtl;
    color: var(--text-main);
    padding: 30px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(circle at 20% 10%, #294d80 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, #3f2e70 0%, transparent 35%),
                linear-gradient(135deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.45;
}

body::before {
    width: 380px;
    height: 380px;
    top: -120px;
    right: -90px;
    background: radial-gradient(circle, rgba(117, 227, 255, 0.55), rgba(117, 227, 255, 0));
    animation: crystalMoveA 26s ease-in-out infinite alternate;
}

body::after {
    width: 440px;
    height: 440px;
    left: -140px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(190, 150, 255, 0.45), rgba(190, 150, 255, 0));
    animation: crystalMoveB 30s ease-in-out infinite alternate;
}

.glass-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    padding: 28px;
    border-radius: 22px;
    color: var(--text-main);
    text-align: center;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-main), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dashboard-panel {
    max-width: 1120px;
    text-align: right;
}

h2 {
    text-align: center;
    margin-bottom: 18px;
    letter-spacing: 0.2px;
    font-weight: 700;
}

.dashboard-panel h2 {
    text-align: right;
    border-bottom: 1px solid var(--soft-border);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tabs a {
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--soft-border);
    border-radius: 12px;
    padding: 9px 14px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-soft);
}

.tabs a:hover,
.tabs a.active {
    background: rgba(130, 214, 255, 0.28);
    border-color: rgba(189, 234, 255, 0.85);
    transform: translateY(-1px);
}

.input-group {
    margin-bottom: 14px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 14px;
}

.input-group input,
.input-group select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--soft-border);
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    outline: none;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-group input::placeholder,
textarea::placeholder {
    color: #e0e9f7;
    opacity: 0.85;
}

.input-group input:focus,
.input-group select:focus,
textarea:focus {
    border-color: rgba(167, 224, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(125, 203, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.input-group select option {
    color: #111;
    background: #f8fbff;
}

.btn {
    display: inline-block;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #051324;
    background: linear-gradient(180deg, #d8f0ff, #95d5ff);
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 20px rgba(0, 0, 0, 0.28);
}

.btn-sm {
    width: auto;
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 10px;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #ff6b81, #ef425a);
}

.btn-success {
    color: #032414;
    background: linear-gradient(180deg, #8ff2c8, #4ddc9a);
}

.msg {
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid transparent;
}

.msg.error {
    background: rgba(255, 86, 108, 0.23);
    border-color: rgba(255, 140, 153, 0.6);
}

.msg.success {
    background: rgba(46, 213, 164, 0.22);
    border-color: rgba(103, 240, 194, 0.55);
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-box {
    border: 1px solid var(--soft-border);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.stat-box h4 {
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 13px;
}

.stat-box span {
    font-size: 24px;
    font-weight: 700;
    color: #fff4cb;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 14px;
    border-radius: 14px;
    border: 1px solid var(--soft-border);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow-soft);
}

.table-glass {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    text-align: center;
}

.table-glass th,
.table-glass td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-glass th {
    background: rgba(2, 12, 24, 0.42);
    color: #dff4ff;
}

.table-glass tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.b-green {
    background: rgba(54, 214, 148, 0.3);
    color: #d9ffee;
}

.b-red {
    background: rgba(255, 88, 107, 0.32);
    color: #ffe5ea;
}

.b-yellow {
    background: rgba(255, 204, 64, 0.34);
    color: #1f1a00;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 24px;
    background: rgba(255, 91, 110, 0.55);
    transition: 0.25s ease;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: #fff;
    transition: 0.25s ease;
}

input:checked + .slider {
    background: rgba(56, 219, 160, 0.8);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--soft-border);
}

.blink-reminder {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    color: #000;
    background: #ffe082;
    border: 1px solid #ffca28;
    animation: tuitionBlink 1.2s ease-in-out infinite;
}

.blocked-item {
    background: rgba(255, 0, 0, 0.32) !important;
    color: #fff !important;
}

@keyframes tuitionBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(255, 193, 7, 0);
    }
    50% {
        opacity: 0.55;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    }
}

@keyframes crystalMoveA {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 50px) scale(1.08); }
    100% { transform: translate(35px, 90px) scale(0.96); }
}

@keyframes crystalMoveB {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(55px, -30px) scale(1.06); }
    100% { transform: translate(110px, -70px) scale(0.94); }
}

@media (max-width: 900px) {
    body {
        padding: 14px 10px;
        align-items: center;
    }

    .glass-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .tabs a {
        font-size: 12px;
        padding: 8px 10px;
        flex-grow: 1;
        text-align: center;
    }

    .btn {
        font-size: 13px;
        padding: 9px 10px;
    }

    .table-glass {
        min-width: 560px;
    }

    .bookings-filters {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--soft-border);
    }

    .bookings-filters label {
        margin: 0;
        font-size: 12px;
        color: var(--text-soft);
    }

    .bookings-filters select,
    .bookings-filters button {
        width: 100%;
    }
}

.bookings-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--soft-border);
}

.bookings-filters label {
    margin: 0;
}

.bookings-filters select {
    min-width: 135px;
    width: auto;
    color: #06101f;
    background: rgba(255, 255, 255, 0.9);
}
