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

:root {
    --primary: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5;
    --bg-body: #f3f4f6;
    --surface: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: transform 0.3s ease;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.nav-menu { list-style: none; flex-grow: 1; }
.nav-item { margin-bottom: 8px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: #eef2ff;
    color: var(--primary);
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.mini-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title h1 { font-size: 1.8rem; font-weight: 700; }
.page-title p { color: var(--text-muted); margin-top: 4px; }

/* --- GRID LAYOUT --- */
.grid-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 32px;
}

/* --- CARDS --- */
.card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Profile Card Specifics */
.cover-photo {
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

.profile-header {
    text-align: center;
    margin-top: -60px;
    padding: 0 20px 20px;
}

.profile-pic-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--surface);
    object-fit: cover;
    box-shadow: var(--shadow);
    background: white;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    border-top: 1px solid var(--border);
    background: #f9fafb;
}

.stat-item { text-align: center; }
.stat-val { font-weight: 700; font-size: 1.1rem; display: block; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Form Styling */
.form-section { padding: 30px; }
.section-head { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--text-main); }

.input-group { margin-bottom: 20px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 8px; }

input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f9fafb;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px #e0e7ff;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.toast.show { transform: translateY(0); }

/* Loading / Guest */
.full-screen-center {
    position: fixed; top:0; left:0; width:100%; height:100%;
    display: flex; justify-content: center; align-items: center;
    background: var(--bg-body); z-index: 100;
}
.guest-card { background: white; padding: 40px; border-radius: 20px; text-align: center; box-shadow: var(--shadow-lg); max-width: 400px; width: 90%; }

/* Mobile */
@media (max-width: 900px) {
    .sidebar { position: fixed; left: -260px; height: 100%; z-index: 50; }
    .sidebar.open { left: 0; }
    .grid-container { grid-template-columns: 1fr; }
    .mobile-toggle { display: block; }
}