* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #e8edf4;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: all 0.3s;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16,185,129,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #10b981;
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #10b981;
}

.logo-text p {
    font-size: 10px;
    opacity: 0.6;
}

.sidebar-close {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.profile {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #10b981;
}

.profile-info h3 {
    font-size: 13px;
    font-weight: 700;
}

.role-badge {
    font-size: 9px;
    background: rgba(16,185,129,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
    color: #10b981;
}

.nav-menu {
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item i:first-child {
    width: 20px;
    font-size: 15px;
}

.nav-item span {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(16,185,129,0.1);
    color: white;
}

.nav-item.active {
    background: linear-gradient(90deg, #10b981, #0f172a);
    color: white;
    border-left: 3px solid #10b981;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
    text-align: center;
}

.system-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
}

.system-status i {
    font-size: 8px;
    color: #10b981;
}

/* ========== BACK TO MENU BUTTON ========== */
.btn-back-menu {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #6EE7B7;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    width: 100%;
}

.btn-back-menu:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(110, 231, 183, 0.15);
}

.btn-back-menu i {
    font-size: 16px;
}

.sidebar-footer p {
    font-size: 9px;
    opacity: 0.4;
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: #e8edf4;
}

.header {
    background: #f5f7fa;
    padding: 0 28px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d1d9e6;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #1e293b;
}

.title-section h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.title-section p {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.pages-container {
    padding: 28px 32px;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #d1d9e6;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 0%, rgba(16,185,129,0.1), transparent 70%);
    pointer-events: none;
}

.welcome-text {
    flex: 1;
    z-index: 1;
}

.greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.greeting i {
    font-size: 32px;
    color: #fbbf24;
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
}

.greeting h2 {
    font-size: 24px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.student-name {
    color: #10b981;
}

.welcome-message {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 20px;
}

.motivation-quote {
    background: rgba(16,185,129,0.1);
    padding: 12px 20px;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.motivation-quote i {
    color: #10b981;
    font-size: 14px;
    opacity: 0.7;
}

.motivation-quote span {
    color: #cbd5e1;
    font-size: 13px;
    font-style: italic;
    flex: 1;
    text-align: center;
}

.welcome-illustration {
    background: linear-gradient(135deg, #1e3a5f, #0f172a);
    width: 100px;
    height: 100px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #334155;
}

.welcome-illustration i {
    font-size: 50px;
    color: #10b981;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s;
    border: 1px solid #d1d9e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #b8c4d4;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.primary .stat-icon { background: rgba(59,130,246,0.15); color: #3b82f6; }
.stat-card.success .stat-icon { background: rgba(16,185,129,0.15); color: #10b981; }
.stat-card.warning .stat-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stat-card.info .stat-icon { background: rgba(139,92,246,0.15); color: #8b5cf6; }

.stat-info h3 {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.stat-info p {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #d1d9e6;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #d1d9e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #f5f7fa;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: #10b981;
}

.card-body {
    padding: 20px 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.badge-count {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f5f7fa;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 2px solid #d1d9e6;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #d1d9e6;
    font-size: 13px;
    color: #1e293b;
}

.data-table tr:hover td {
    background: #f5f7fa;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    color: #1e293b;
    font-size: 13px;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.form-row .form-group {
    margin-bottom: 0;
}

textarea.form-input {
    resize: vertical;
    font-family: inherit;
}

/* ===== BUTTONS ===== */
.btn-add {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    justify-content: center;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-delete-all {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-delete-all:hover {
    background: #dc2626;
}

.btn-upload {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 12px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-delete-anecdote {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.2);
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-delete-anecdote:hover {
    background: #ef4444;
    color: white;
}

/* ===== PROFILE ===== */
.profile-flex {
    display: flex;
    gap: 40px;
    padding: 8px 0;
    flex-wrap: wrap;
    align-items: flex-start;
}

.profile-avatar-area {
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar-area img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #10b981;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.profile-avatar-area img:hover {
    transform: scale(1.02);
    border-color: #059669;
}

.profile-info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}

.profile-info-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info-grid label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-info-grid label i {
    color: #10b981;
    font-size: 12px;
}

.profile-info-grid span {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.stats-mini {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    text-align: center;
}

.stats-mini div span {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
    display: block;
}

.stats-mini div label {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    font-weight: 500;
}

/* ===== ANECDOTE ===== */
.anecdote-item {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid #d1d9e6;
    transition: all 0.2s;
}

.anecdote-item:hover {
    border-color: #10b981;
    background: #ffffff;
}

.anecdote-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.anecdote-type {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.anecdote-type.peringatan { background: rgba(239,68,68,0.15); color: #ef4444; }
.anecdote-type.prestasi { background: rgba(16,185,129,0.15); color: #10b981; }
.anecdote-type.tugas { background: rgba(59,130,246,0.15); color: #3b82f6; }
.anecdote-type.informasi { background: rgba(139,92,246,0.15); color: #8b5cf6; }

.anecdote-date {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

.anecdote-message {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 8px;
}

.anecdote-target {
    font-size: 11px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== TOAST ===== */
#toastContainer {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 500px;
    pointer-events: none;
}

.toast-notification {
    background: #1e293b;
    color: #f1f5f9;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid #334155;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-notification.success {
    background: linear-gradient(135deg, #065f46, #047857);
    border-color: #10b981;
}

.toast-notification.error {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: #ef4444;
}

/* ===== MODAL POPUP ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #1e293b;
}

.modal-content button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
    }
    .sidebar.show { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: block; }
    .sidebar-close { display: block; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .welcome-banner { flex-direction: column; text-align: center; }
    .greeting { justify-content: center; }
    .motivation-quote { justify-content: center; }
    .welcome-illustration { margin-top: 20px; }
    .profile-flex { flex-direction: column; align-items: center; }
    .profile-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .pages-container { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .form-row .form-group { margin-bottom: 16px; }
    .welcome-banner { padding: 20px; }
    .greeting h2 { font-size: 18px; }
    .motivation-quote span { font-size: 11px; }
    .card-header { flex-direction: column; align-items: flex-start; }
    #toastContainer { max-width: 90%; top: 70px; }
    .header { padding: 0 16px; }
    .modal-content { margin: 30% auto; padding: 20px; width: 90%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .title-section h1 { font-size: 16px; }
    .date-display { display: none; }
    .pages-container { padding: 12px; }
    .profile-avatar-area img { width: 80px; height: 80px; }
} 