/* ==========================================================
   Saraswati Bal Niketan - Admin Dashboard Stylesheet (Premium)
   ========================================================== */

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-input: #1f2937;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(59, 130, 246, 0.5);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* === LOGIN SCREEN === */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at top right, rgba(30, 58, 138, 0.2), transparent),
                radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.05), transparent);
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.login-header i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: inline-block;
}

.login-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* === MAIN LAYOUT === */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: rgba(13, 18, 30, 0.95);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--accent);
}

.sidebar-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.menu-item button {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    text-align: left;
}

.menu-item button:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.menu-item.active button {
    background: linear-gradient(135deg, var(--primary), rgba(59, 130, 246, 0.2));
    color: white;
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    margin-top: auto;
}

.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem;
    transition: margin-left 0.3s ease;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.top-bar h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-badge i {
    color: var(--success);
}

/* === FORMS & INPUTS === */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-focus);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* === UPLOAD AREA === */
.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.upload-dropzone i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.upload-dropzone p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upload-dropzone span {
    color: var(--primary);
    font-weight: 600;
}

.upload-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* === TAB PANELS === */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* === CARD DESIGNS === */
.card-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-premium);
    margin-bottom: 2rem;
}

.card-section h3 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-section h3 i {
    color: var(--primary);
}

/* === IMAGE PREVIEW GRID === */
.image-preview-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.preview-thumb {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.preview-thumb.circle {
    border-radius: 50%;
}

.preview-details {
    flex-grow: 1;
}

.preview-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.preview-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === GALLERY MANAGER === */
.gallery-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
}

.gallery-item-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.gallery-img-wrapper {
    position: relative;
    aspect-ratio: 3/2;
    background: var(--bg-input);
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-cat-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.gallery-item-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-item-info h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.gallery-item-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* === MODAL BOXES === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    animation: zoomIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 2rem 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

/* === NOTIFICATION BANNERS === */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-toast {
    background: rgba(17, 24, 39, 0.9);
    border-left: 4px solid var(--success);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 450px;
    animation: slideInRight 0.3s ease forwards;
}

.admin-toast.error {
    border-left-color: var(--danger);
}

.admin-toast.success {
    border-left-color: var(--success);
}

.admin-toast.info {
    border-left-color: var(--primary);
}

/* === RESPONSIVE STYLING === */
@media (max-width: 1024px) {
    .main-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    .image-preview-card {
        flex-direction: column;
        text-align: center;
    }
    .top-bar {
        margin-bottom: 2rem;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
