/* ================================================
   Reset & Base
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #e0e7ff;
    --accent: #06b6d4;
    --success: #10b981;
    --error: #ef4444;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --white: #ffffff;
    --card-shadow: 0 4px 24px rgba(79,70,229,0.10);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ================================================
   PUBLIC PROFILE PAGE
   ================================================ */
.profile-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    max-width: 560px;
    width: 100%;
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    padding: 48px 32px 32px;
    text-align: center;
    color: white;
}

.avatar-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.8);
    margin: 0 auto 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.2);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.profile-nim {
    font-size: 0.95rem;
    opacity: 0.85;
    letter-spacing: 1px;
    font-weight: 500;
}

.profile-prodi {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 4px;
}

.profile-univ {
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.85;
}

.profile-univ i { margin-right: 4px; }

.profile-section {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type { border-bottom: none; }

.profile-section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.profile-section h2 i { margin-right: 6px; }

.bio-text { color: var(--text-muted); line-height: 1.7; }

.info-list { list-style: none; }
.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    color: var(--text-muted);
}
.info-list li i { color: var(--primary); width: 16px; margin-top: 3px; }
.info-list li span { flex: 1; }

.social-links { display: flex; flex-wrap: wrap; gap: 10px; }

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.social-btn.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
.social-btn.linkedin { background: #0077b5; color: white; }
.social-btn.github { background: #24292e; color: white; }

.profile-footer {
    padding: 16px 32px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg);
}

/* ================================================
   ADMIN - LOGIN PAGE
   ================================================ */
.admin-body {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary);
}

.login-card h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

.login-card .form-group { text-align: left; margin-bottom: 16px; }
.login-card label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.login-card input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
    color: var(--text);
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.input-eye { position: relative; display: flex; }
.input-eye input { padding-right: 44px; }
.eye-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 4px; font-size: 0.95rem;
}
.eye-btn:hover { color: var(--primary); }

.login-back { margin-top: 20px; }
.login-back a { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; }
.login-back a:hover { color: var(--primary); }

/* ================================================
   ADMIN - DASHBOARD
   ================================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 28px 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}
.sidebar-logo i { font-size: 1.4rem; }

.sidebar-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-item:hover, .nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-logout { margin-top: auto; color: var(--error); }
.nav-logout:hover { background: #fef2f2; color: var(--error); }

.admin-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    max-width: 860px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-header h1 { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.admin-header h1 i { color: var(--primary); margin-right: 8px; }

/* ================================================
   FORM COMPONENTS
   ================================================ */
.admin-form { display: flex; flex-direction: column; gap: 20px; }

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-card h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.form-card h2 i { margin-right: 6px; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
    background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group textarea { resize: vertical; min-height: 80px; }

.input-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input-prefix span {
    padding: 10px 12px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    border-right: 1px solid var(--border);
}
.input-prefix input { border: none; box-shadow: none; border-radius: 0; }
.input-prefix input:focus { box-shadow: none; border-color: transparent; }

.hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.required { color: var(--error); }

/* Foto preview */
.foto-preview-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.foto-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    background: var(--bg);
}
.foto-upload-btn { display: flex; flex-direction: column; gap: 6px; }

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(79,70,229,0.35); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }

/* ================================================
   ALERTS
   ================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
        overflow: hidden;
    }
    .sidebar-logo span,
    .nav-item span { display: none; }
    .sidebar-logo { justify-content: center; padding: 20px 0; }
    .nav-item { justify-content: center; }
    .admin-main { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .profile-section { padding: 20px; }
    .profile-header { padding: 36px 20px 24px; }
    .login-card { padding: 32px 24px; }
}
