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

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #0ea5e9;
    --background: #f0f9ff;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-border: rgba(255, 255, 255, 0.5);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --danger: #ef4444;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-main);
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255,255,255,0.7);
}

.header-title {
    text-align: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
input[type="file"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.photo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.photo-preview {
    width: 150px;
    height: 200px; /* 3x4 proportion roughly */
    border-radius: 12px;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 2px dashed #cbd5e1;
    position: relative;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-preview .placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

.btn-submit {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- ADMIN LAYOUT --- */
body.admin-body {
    padding: 0;
    display: block;
    align-items: stretch;
    justify-content: flex-start;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--surface-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.sidebar-header h2 {
    color: var(--primary-dark);
    font-size: 1.4rem;
    line-height: 1.2;
}

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

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--primary);
    color: white;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
}

.main-content > .dashboard-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.nav-badge { background: var(--danger); color: white; font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-weight: bold; margin-left: auto; }
.sidebar-header img { max-width: 150px; height: auto; }
