/* Global Modern School ERP System Styles */

/* 1. Global Font Override */
* {
    font-family: 'Roboto Slab', serif !important;
}

/* Custom Scrollbar for premium SaaS feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* 2. Static Stable Gradient Background */
.animated-mesh-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
    background-size: 100% 100% !important;
    animation: none !important;
}

.dark .animated-mesh-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    background-size: 100% 100% !important;
    animation: none !important;
}

/* 3. Glassmorphism Card Style */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 40px 0 rgba(31, 38, 135, 0.05);
}

.dark .glass-panel {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* 4. Fully Customized Dropdowns and Select Fields */
.custom-select-field {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.25rem !important;
    padding-right: 2.5rem !important;
}

.dark .custom-select-field {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

/* 5. Fully Customized Radio Buttons */
.custom-radio {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #ffffff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: inline-grid;
    place-content: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.custom-radio::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #3d52f5;
}

.custom-radio:checked {
    border-color: #3d52f5;
}

.custom-radio:checked::before {
    transform: scale(1);
}

.dark .custom-radio {
    background-color: #1e293b;
    border-color: #475569;
}

.dark .custom-radio::before {
    box-shadow: inset 1em 1em #5c7aff;
}

.dark .custom-radio:checked {
    border-color: #5c7aff;
}

/* 6. Custom Radio Cards Checked State */
.custom-radio-card input:checked + .radio-card-content {
    border-color: #3d52f5;
    background-color: rgba(61, 82, 245, 0.05);
    box-shadow: 0 0 15px rgba(61, 82, 245, 0.15);
}

.dark .custom-radio-card input:checked + .radio-card-content {
    border-color: #5c7aff;
    background-color: rgba(92, 122, 255, 0.1);
    box-shadow: 0 0 15px rgba(92, 122, 255, 0.2);
}

/* 7. Dynamic jQuery Validation Shaking Error Animation */
input.error, select.error, textarea.error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2) !important;
    animation: shake 0.3s ease-in-out;
}

label.error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

.dark label.error {
    color: #f87171;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 8. Animated Submission Fullscreen Loader */
.submit-loader-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-left-color: #5c7aff;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 10px rgba(92, 122, 255, 0.5));
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animated-loading-text {
    background: linear-gradient(to right, #ffffff 20%, #85a3ff 40%, #5c7aff 60%, #ffffff 80%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 2s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* 9. Drag and Drop Upload Box */
.drag-drop-zone {
    transition: all 0.3s ease;
}

.drag-drop-zone.dragover {
    border-color: #3d52f5;
    background-color: rgba(61, 82, 245, 0.05);
    transform: scale(1.02);
}

.dark .drag-drop-zone.dragover {
    border-color: #5c7aff;
    background-color: rgba(92, 122, 255, 0.1);
}


