/* ========================================
   KALENDER PENDIDIKAN - PROFESSIONAL STYLES
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --emerald-50: #ecfdf5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --indigo-600: #4f46e5;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    box-sizing: border-box;
}

/* ========================================
   HEADER
   ======================================== */
.app-header {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
    color: white;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.header-logo svg {
    width: 32px;
    height: 32px;
}

.header-titles h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.header-titles p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.125rem;
}

.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--brand-600);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-700);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--green-600);
    color: white;
}

.btn-success:hover {
    background: var(--emerald-600);
    box-shadow: var(--shadow-md);
}

.btn-teal {
    background: var(--teal-600);
    color: white;
}

.btn-teal:hover {
    background: var(--teal-500);
}

.btn-indigo {
    background: var(--indigo-600);
    color: white;
}

.btn-indigo:hover {
    background: var(--brand-700);
}

.btn-light {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-light:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-light-sm {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-light-sm:hover {
    background: var(--gray-50);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger-light {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
}

.btn-danger-light:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-danger {
    background: var(--red-600);
    color: white;
}

.btn-danger:hover {
    background: var(--red-700);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ========================================
   HERO CARD
   ======================================== */
.hero-card {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-titles h2 {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.hero-titles p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.select-period {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.select-period option {
    color: var(--gray-800);
}

.hero-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red {
    background: var(--red-400);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.dot-blue {
    background: var(--brand-200);
    box-shadow: 0 0 8px rgba(199, 210, 254, 0.5);
}

.dot-amber {
    background: var(--amber-400);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* ========================================
   VIEW TOGGLE
   ======================================== */
.view-toggle-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.vt-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.vt-btn.active {
    background: var(--brand-600);
    color: white;
    box-shadow: var(--shadow-md);
}

.vt-btn:hover:not(.active) {
    color: var(--brand-600);
    background: white;
}

.view-info {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
}

/* ========================================
   MONTH NAVIGATION
   ======================================== */
.month-nav {
    background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-50) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-nav h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-700);
    letter-spacing: -0.025em;
}

.month-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--brand-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--brand-600);
    text-decoration: none;
}

.month-nav-btn:hover {
    background: var(--brand-600);
    color: white;
    box-shadow: var(--shadow-md);
}

.month-nav-btn:active {
    transform: scale(0.95);
}

/* ========================================
   CALENDAR
   ======================================== */
.calendar-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.day-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
    color: white;
    border-bottom: 3px solid var(--brand-200);
}

.dh {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dh-weekend {
    color: rgba(255, 255, 255, 0.7);
}

.day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--gray-200);
    padding: 4px;
}

.day-cell {
    background: white;
    min-height: 100px;
    min-width: 0;
    padding: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.day-cell:hover:not(.day-empty) {
    background: var(--brand-50);
    box-shadow: inset 0 0 0 2px var(--brand-300);
}

.day-empty {
    background: var(--gray-50);
    cursor: default;
}

.cell-weekend {
    background: var(--gray-50);
    color: var(--gray-400);
}

.cell-holiday {
    background: var(--red-50);
}

.cell-exam {
    background: var(--amber-50);
}

.cell-school {
    background: var(--brand-50);
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.day-today {
    background: var(--brand-600);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-event-tag {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
}

.ev-holiday {
    background: var(--red-500);
}

.ev-school {
    background: var(--brand-600);
}

.ev-school_reduced {
    background: var(--red-500);
}

.cell-school-reduced {
    background: var(--red-50);
}

.ev-exam {
    background: var(--amber-500);
}

.day-event-more {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--gray-500);
    text-align: center;
}

/* ========================================
   OVERVIEW GRID
   ======================================== */
.overview-title-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.overview-title-card h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-800);
    margin-bottom: 0.5rem;
}

.overview-title-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ========================================
   AGENDA
   ======================================== */
.agenda-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--brand-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
}

.section-icon.teal {
    background: rgba(20, 184, 166, 0.1);
    color: var(--teal-600);
}

.agenda-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.mini-toggle {
    display: flex;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.mt-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.mt-btn.active {
    background: white;
    color: var(--brand-700);
    box-shadow: var(--shadow-sm);
}

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* ========================================
   ANALYSIS
   ======================================== */
.analysis-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    border: 1px solid;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.stat-box.brand {
    border-color: var(--brand-200);
    background: var(--brand-50);
}

.stat-box.emerald {
    border-color: rgba(167, 243, 208, 1);
    background: var(--emerald-50);
}

.stat-box.amber {
    border-color: rgba(253, 230, 138, 1);
    background: var(--amber-50);
}

.stat-box.red {
    border-color: var(--red-100);
    background: var(--red-50);
}

.stat-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-box.brand .stat-label {
    color: var(--brand-600);
}

.stat-box.emerald .stat-label {
    color: var(--emerald-600);
}

.stat-box.amber .stat-label {
    color: var(--amber-600);
}

.stat-box.red .stat-label {
    color: var(--red-600);
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gray-800);
}

.day-breakdown-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    overflow-x: auto;
}

.day-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-sm {
    max-width: 400px;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header.gradient {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
    color: white;
    border-bottom: none;
}

.modal-header.amber {
    background: linear-gradient(135deg, var(--amber-600) 0%, var(--amber-500) 100%);
    color: white;
    border-bottom: none;
}

.modal-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-file {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background: var(--red-50);
    border: 1px solid var(--red-100);
    color: var(--red-700);
}

.alert-success {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--green-600);
}

/* ========================================
   SYNC BAR
   ======================================== */
.sync-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--brand-800) 0%, var(--gray-900) 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 50;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald-500);
    animation: pulse 2s infinite;
}

.sync-idle {
    background: var(--brand-500);
}

.sync-sep {
    color: rgba(255, 255, 255, 0.3);
}

.sync-brand {
    color: rgba(255, 255, 255, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   TOAST
   ======================================== */
.toast {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    background: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1001;
}

.toast.show {
    opacity: 1;
    transform: translateY(-1rem);
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-body {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.login-form {
    padding: 2rem;
}

.login-footer {
    padding: 1.5rem 2rem;
    background: var(--gray-50);
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.login-footer a {
    color: var(--brand-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.login-footer a:hover {
    color: var(--brand-700);
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-wrapper {
    max-width: 500px;
    margin: 2rem auto;
}

.profile-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.profile-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.profile-header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.profile-form {
    padding: 2rem;
}

.profile-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

/* ========================================
   IMPORT INFO
   ======================================== */
.import-info {
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.info-title {
    font-weight: 900;
    color: var(--brand-800);
    margin-bottom: 0.75rem;
}

.import-info ul {
    list-style: none;
    margin: 0.75rem 0;
}

.import-info li {
    padding: 0.25rem 0;
    color: var(--brand-800);
}

.import-info code {
    background: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-600);
}

.info-example {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0.75rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--brand-600);
    border-radius: 999px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
    text-align: center;
}

.confirm-msg {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.text-center {
    text-align: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Cegah overflow horizontal di semua perangkat */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

img, svg, table, video, iframe {
    max-width: 100%;
    height: auto;
}


/* ========================================
   OVERVIEW MINI MONTH CARD
   ======================================== */
.ov-month-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform .25s ease, box-shadow .25s ease;
}
.ov-month-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ===== LAPTOP / DESKTOP KECIL (≤ 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        padding: 1.25rem;
    }

    .overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* ===== TABLET (≤ 768px) ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-bottom: 4rem; /* ruang untuk sync-bar */
    }

    /* Header menumpuk rapi */
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .header-right {
        justify-content: flex-end;
    }

    /* Hero menumpuk */
    .hero-card {
        padding: 1.5rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .hero-titles h2 {
        font-size: 1.5rem;
    }

    .hero-controls {
        width: 100%;
    }

    .select-period {
        flex: 1;
        min-width: 0;
    }

    /* View toggle & agenda actions menumpuk */
    .view-toggle-card,
    .agenda-header,
    .analysis-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .view-toggle,
    .mini-toggle {
        width: 100%;
    }

    .vt-btn,
    .mt-btn {
        flex: 1;
        justify-content: center;
    }

    .agenda-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .agenda-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .month-nav h3 {
        font-size: 1.25rem;
    }

    .day-cell {
        min-height: 72px;
        padding: 0.375rem;
    }

    .day-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .day-event-tag {
        font-size: 0.55rem;
        padding: 0.1rem 0.25rem;
    }

    .agenda-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

/* ===== HP (≤ 480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
        padding-bottom: 4rem;
    }

    .day-breakdown-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .app-header {
        padding: 0.75rem 1rem;
    }

    .header-titles h1 {
        font-size: 1.15rem;
    }

    .header-titles p {
        font-size: 0.7rem;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

    .btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.75rem;
    }

    .hero-card {
        padding: 1.25rem;
        border-radius: var(--radius-xl);
    }

    .hero-titles h2 {
        font-size: 1.25rem;
    }

    .hero-legend {
        gap: 0.75rem;
        font-size: 0.75rem;
    }

    /* Kalender: izinkan scroll horizontal jika perlu */
    .calendar-card {
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .day-grid,
    .day-header {
        min-width: 320px; /* Lebar minimum agar sel tidak terlalu kecil */
    }

    .month-nav {
        padding: 0.75rem;
    }

    .day-grid {
        gap: 1px;
        padding: 2px;
    }

    .day-header {
        border-bottom-width: 2px;
    }

    .dh {
        padding: 0.35rem 0;
        font-size: 0.55rem;
        letter-spacing: 0;
    }

    .day-cell {
        min-height: 50px;
        padding: 2px;
    }

    .day-number {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        margin-bottom: 0;
    }

    /* Di HP, tampilkan titik kategori saja agar tidak penuh teks */
    .day-event-tag {
        font-size: 0;
        padding: 0;
        height: 4px;
        width: 100%;
        border-radius: 2px;
        margin-bottom: 1px;
    }

    .day-event-more {
        font-size: 0.5rem;
    }

    .day-events {
        gap: 1px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-box {
        padding: 0.85rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.05rem;
    }

    /* Modal mengisi layar dengan nyaman */
    .modal-content,
    .modal-sm {
        max-width: 100%;
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1.25rem;
    }
}

/* ===== HP SANGAT KECIL (≤ 360px) ===== */
@media (max-width: 360px) {
    .container {
        padding: 0.5rem;
    }

    .hero-card {
        padding: 1rem;
    }

    .day-cell {
        min-height: 38px;
    }

    .dh {
        font-size: 0.45rem;
    }

    .day-number {
        width: 16px;
        height: 16px;
        font-size: 0.55rem;
    }

    .hero-titles h2 {
        font-size: 1.05rem;
    }

    .month-nav {
        padding: 0.5rem;
    }

    .month-nav h3 {
        font-size: 1rem;
    }

    .month-nav-btn {
        width: 32px;
        height: 32px;
    }
}
