@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --bg-light: #eff3f7; /* Slightly darker to contrast with white panels */
    --panel-bg: #ffffff;
    --border-color: #cbd5e1; /* Darker, crisper border */
    --ba-primary: #1e90ff; /* Deeper, more contrasting blue */
    --ba-secondary: #3498db;
    --ba-accent: #f39c12;
    --ba-danger: #e74c3c; /* Stronger red */
    --ba-success: #2ecc71;
    --text-dark: #111111; /* Near black for maximum contrast */
    --text-muted: #64748b; /* Darker muted text */
    --font-main: 'Nunito', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    background-image: radial-gradient(rgba(30, 144, 255, 0.15) 2px, transparent 2px); /* Higher contrast dots */
    background-size: 25px 25px;
    background-position: 0 0;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Halo Motif */
body::after {
    content: '';
    position: fixed;
    top: -20vh;
    right: -10vw;
    width: 70vw;
    height: 70vw;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" stroke="%231e90ff" stroke-width="1.5" fill="none" opacity="0.08" stroke-dasharray="8 4" /><circle cx="50" cy="50" r="40" stroke="%231e90ff" stroke-width="0.5" fill="none" opacity="0.05" /><path d="M50 0 L50 10 M50 90 L50 100 M0 50 L10 50 M90 50 L100 50" stroke="%231e90ff" stroke-width="2" opacity="0.1" /></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    z-index: -2;
    animation: rotateHalo 180s linear infinite;
    pointer-events: none;
}

@keyframes rotateHalo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ba-primary);
}

.ba-blue { color: var(--ba-primary); font-weight: bold; }
.ba-cyan { color: var(--ba-secondary); font-weight: bold; }
.text-center { text-align: center; }
.text-small { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px; /* Soft rounded buttons */
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 10px; height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg) translateX(-20px);
    transition: transform 0.3s;
}
.btn:hover::after {
    transform: skewX(-20deg) translateX(150px);
}

.primary-btn {
    background-color: var(--ba-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(18, 130, 236, 0.3);
}

.primary-btn:hover {
    background-color: #0e6cbd;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(18, 130, 236, 0.4);
}

.secondary-btn {
    background-color: #fff;
    color: var(--ba-primary);
    border: 2px solid var(--ba-primary);
}

.secondary-btn:hover {
    background-color: rgba(18, 130, 236, 0.05);
    transform: translateY(-2px);
}

.danger-btn {
    background-color: var(--ba-danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 118, 117, 0.2);
}
.danger-btn:hover {
    background-color: #e56b6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 118, 117, 0.3);
}

.small-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Panels */
.ba-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px; /* Soft, large rounded corners */
    padding: 24px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02); /* Softer shadow */
    z-index: 10;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ba-panel:hover {
    box-shadow: 0 12px 40px rgba(52, 152, 219, 0.05);
}.panel-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-header h2 {
    display: inline-block;
    position: relative;
    padding: 5px 15px;
    color: var(--ba-primary); /* Soft blue text instead of white block */
    font-size: 1.2rem;
    z-index: 1;
}
.panel-header h2::before {
    content: '';
    position: absolute;
    top: 50%; left: -10px;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: var(--ba-primary); /* Just a soft blue line accent */
    border-radius: 4px;
    z-index: -1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.9rem;
}

input[type="text"], input[type="password"], textarea, select {
    width: 100%;
    background: #fbfdff;
    border: 2px solid var(--border-color); /* Softer borders */
    border-radius: 8px; /* Rounded inputs */
    color: var(--text-dark);
    padding: 12px 15px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--ba-primary);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.alert {
    padding: 12px;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 700;
}
.error { background: rgba(255, 71, 87, 0.1); color: var(--ba-danger); border-left: 4px solid var(--ba-danger); }
.success { background: rgba(46, 213, 115, 0.1); color: #22a659; border-left: 4px solid var(--ba-success); }

/* Login Page specific */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    background-image: radial-gradient(rgba(30, 144, 255, 0.15) 2px, transparent 2px);
    background-size: 25px 25px;
}
.login-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}
.panel-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.decals {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--ba-secondary);
    font-weight: 800;
}

/* Navigation */
.ba-nav {
    background: #ffffff;
    border-bottom: 2px solid var(--border-color); /* Soften bottom border */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    position: relative;
}
.nav-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--ba-primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.schale-logo {
    height: 35px;
    width: auto;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Tabs */
.tab-container {
    display: flex;
    background: #fff;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 3px solid transparent;
    border-radius: 12px 12px 0 0; /* Soft rounded tabs instead of cut corners */
    background-color: transparent; 
    margin-right: 5px; 
}
.tab:last-child { margin-right: 0; }
.tab.active {
    color: var(--ba-primary);
    background: #fff;
    border-bottom: 3px solid var(--ba-primary);
}
.tab:hover:not(.active) {
    background: #f8f9fa;
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.admin-main-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}
.section-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}
.spinner-ring {
    width: 50px; height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--ba-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Contact Details */
.detail-group {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.detail-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}
.data-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}
.data-value.highlight {
    color: var(--ba-primary);
}

.badge {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
}
.status-locked {
    background: rgba(255, 71, 87, 0.1);
    color: var(--ba-danger);
}

/* Table */
.table-responsive { overflow-x: auto; margin-top: 15px;}
.ba-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.ba-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 800;
    color: var(--ba-primary);
    background: rgba(18, 130, 236, 0.05);
    border-bottom: 2px solid var(--border-color);
}
.ba-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}
.ba-table tr {
    transition: all 0.2s ease;
}
.ba-table tr:hover td {
    background-color: rgba(18, 130, 236, 0.03);
    transform: scale(1.01);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(47, 53, 66, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal-content {
    width: 100%;
    max-width: 500px;
    margin: 20px;
    border-radius: 16px; /* Soft rounded corners */
}
.modal-actions {
    display: flex;
    gap: 10px;
}

.radio-group { display: flex; gap: 15px; }
.radio-label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-weight: 600; }

/* Admin Grid */
.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: center;
    margin-top: 15px;
}
.stat-box {
    background: #fbfdff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.08);
}
.stat-box h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 5px;}
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--ba-primary); }
.hidden { display: none !important; }

.data-toolbar {
    margin-bottom: 15px;
}
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.page-info {
    font-weight: 700;
    color: var(--text-muted);
}
.neon-danger { color: var(--ba-danger) !important; font-weight: bold; }

/* Rose Petals & Animations */
.rose-petal {
    position: fixed;
    top: -10vh;
    background-color: #ff99aa; /* Light pink/rose color */
    border-radius: 15px 0 15px 0; /* Classic petal shape */
    box-shadow: 0 0 8px rgba(255, 153, 170, 0.4);
    z-index: -1; /* Keep it behind panels but above gradient */
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity, 0.8);
    }
    90% {
        opacity: var(--opacity, 0.8);
    }
    100% {
        transform: translateY(110vh) rotate(360deg) translateX(var(--drift, 50px));
        opacity: 0;
    }
}

/* Panel Header Gradient Animation */
.ba-panel::before {
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

