/* =========================================
   VARIABLES & RESET - CYAN BLUE THEME
   ========================================= */
:root {
    /* Dark Theme (Default) - CYAN BLUE */
    --bg-primary: #0a1929;
    --bg-secondary: #132f4c;
    --bg-surface: #1e4976;
    --primary: #00b4d8;
    --primary-dark: #0096c7;
    --primary-light: #48cae4;
    --secondary: #0077b6;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --info: #118ab2;
    
    /* Cyan Blues */
    --cyan-50: #e0f7fa;
    --cyan-100: #b2ebf2;
    --cyan-200: #80deea;
    --cyan-300: #4dd0e1;
    --cyan-400: #26c6da;
    --cyan-500: #00bcd4;
    --cyan-600: #00acc1;
    --cyan-700: #0097a7;
    --cyan-800: #00838f;
    --cyan-900: #006064;
    
    /* Personal Event Colors */
    --personal-red: #ef4444;
    --personal-blue: #3b82f6;
    --personal-green: #10b981;
    --personal-purple: #8b5cf6;
    --personal-orange: #f59e0b;
    --personal-pink: #ec4899;
    
    /* Blue Gradients */
    --gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    --gradient-light: linear-gradient(135deg, #48cae4 0%, #0096c7 100%);
    --gradient-dark: linear-gradient(135deg, #0096c7 0%, #005b8f 100%);
    
    /* Text Colors */
    --text-primary: #e0f7fa;
    --text-secondary: #80deea;
    --text-muted: #4dd0e1;
    --text-light: #ffffff;
    
    /* UI Colors */
    --border: #1e4976;
    --shadow: rgba(0, 180, 216, 0.15);
    --overlay: rgba(10, 25, 41, 0.9);
    
    /* Layout */
    --nav-height: 70px;
    --fab-size: 60px;
}

[data-theme="light"] {
    --bg-primary: #f0f9ff;
    --bg-secondary: #ffffff;
    --bg-surface: #e1f5fe;
    --primary: #00b4d8;
    --primary-dark: #0096c7;
    --primary-light: #48cae4;
    --secondary: #0077b6;
    --success: #06d6a0;
    --warning: #ff9e00;
    --danger: #ef476f;
    --info: #118ab2;
    
    /* Text Colors Light */
    --text-primary: #0a1929;
    --text-secondary: #1e4976;
    --text-muted: #5a7a9c;
    --text-light: #ffffff;
    
    /* UI Colors Light */
    --border: #c5e6f6;
    --shadow: rgba(0, 180, 216, 0.1);
    --overlay: rgba(240, 249, 255, 0.9);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    transition: all 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.cyan {
    background: var(--cyan-500) !important;
    color: white !important;
}

.cyan-icon {
    color: var(--cyan-400) !important;
}

.mobile-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.compact-card {
    margin-bottom: 15px !important;
    padding: 15px !important;
}

.desktop-only {
    display: none !important;
}

/* =========================================
   LOGIN PAGE
   ========================================= */
#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease;
    padding: 15px;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 15px;
}

.login-card {
    background: rgba(19, 47, 76, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 119, 182, 0.4);
    animation: slideUp 0.6s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 180, 216, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* School Logo Container */
.logo-school-container {
    text-align: center;
    margin-bottom: 25px;
}

.logo-school {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.school-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border: 3px solid var(--cyan-400);
    box-shadow: 0 5px 20px rgba(0, 180, 216, 0.3);
    flex-shrink: 0;
}

.school-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    border: 3px solid var(--cyan-400);
    box-shadow: 0 5px 20px rgba(0, 180, 216, 0.3);
    flex-shrink: 0;
}

.logo-text {
    text-align: left;
    min-width: 150px;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--cyan-300);
    font-weight: 500;
    letter-spacing: 1px;
}

.logo-subtitle {
    margin-top: 10px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--cyan-200);
    opacity: 0.9;
}

/* Form Styling */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group.floating input,
.input-group.floating textarea,
.input-group.floating select {
    width: 100%;
    padding: 14px 40px 14px 40px;
    border: 2px solid rgba(0, 180, 216, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-group.floating input:focus,
.input-group.floating textarea:focus,
.input-group.floating select:focus {
    outline: none;
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.input-group.floating label {
    position: absolute;
    left: 40px;
    top: 14px;
    color: var(--cyan-300);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: rgba(19, 47, 76, 0.95);
    padding: 0 5px;
}

.input-group.floating input:focus + label,
.input-group.floating input:not(:placeholder-shown) + label,
.input-group.floating textarea:focus + label,
.input-group.floating textarea:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--cyan-400);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyan-400);
    z-index: 2;
    width: 20px;
    text-align: center;
}

.input-group.password-group {
    position: relative;
}

.input-group.password-group .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    color: var(--cyan-400);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 15px;
    font-family: 'Poppins', sans-serif;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 180, 216, 0.4);
}

/* Login Footer */
.login-footer {
    margin-top: 25px;
    text-align: center;
}

.password-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 180, 216, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.password-hint i {
    color: var(--cyan-400);
}

.login-instruction {
    background: rgba(0, 180, 216, 0.05);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    margin-top: 12px;
    font-size: 0.85rem;
}

.login-instruction p {
    margin: 4px 0;
    color: var(--cyan-300);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(19, 47, 76, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 180, 216, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
    overflow: hidden;
}

.brand-text h1 {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--cyan-300);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date & Time Widget */
.datetime-widget {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
    flex-shrink: 0;
}

.time-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan-400);
    font-family: 'Courier New', monospace;
}

.date-display {
    font-size: 0.7rem;
    color: var(--cyan-300);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    color: var(--cyan-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--cyan-500);
    color: white;
    transform: translateY(-2px);
    border-color: var(--cyan-500);
}

.badge-chat, .badge-notif {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 180, 216, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 180, 216, 0.2);
    flex-shrink: 0;
}

.nav-user:hover {
    background: rgba(0, 180, 216, 0.2);
    border-color: var(--cyan-400);
}

.user-info {
    display: none;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--cyan-300);
}

.user-role {
    font-size: 0.7rem;
    color: var(--cyan-400);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--cyan-400);
    flex-shrink: 0;
}

.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    background: var(--success);
    flex-shrink: 0;
}

.nav-spacer {
    height: var(--nav-height);
    flex-shrink: 0;
}

/* =========================================
   MAIN LAYOUT & CARDS - OPTIMIZED FOR MOBILE
   ========================================= */
.main-container {
    width: 100%;
    max-width: 100vw;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: calc(100vh - var(--nav-height) - var(--fab-size) - 40px);
    overflow-x: hidden;
}

/* Welcome Card - DIPERBAIKI UNTUK LIGHT MODE */
.welcome-card {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    width: 100%;
}

[data-theme="light"] .welcome-card {
    color: #0a1929 !important;
}

[data-theme="light"] .welcome-text h2 {
    color: #0a1929 !important;
}

[data-theme="light"] .welcome-message {
    color: #1e4976 !important;
}

[data-theme="light"] .welcome-tags .tag {
    color: #0a1929 !important;
    background: rgba(0, 180, 216, 0.1) !important;
    border-color: rgba(0, 180, 216, 0.2) !important;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.welcome-text h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: white;
    line-height: 1.2;
}

.welcome-message {
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    font-size: 1rem;
}

.welcome-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.welcome-tags .tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    padding: 4px 8px;
}

.welcome-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--cyan-400);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.15);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, #00b4d8 0%, #48cae4 100%);
}

.stat-icon.teal {
    background: linear-gradient(135deg, #06d6a0 0%, #0a9396 100%);
}

.stat-icon.indigo {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 3px;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
    width: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 180, 216, 0.2);
    border-color: rgba(0, 180, 216, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* =========================================
   TASKS & COUNTDOWN
   ========================================= */
.countdown-box {
    background: rgba(0, 180, 216, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.cd-main-task {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 180, 216, 0.1);
    margin-bottom: 15px;
}

.task-priority {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.priority-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.priority-badge.high {
    background: linear-gradient(135deg, #ef476f 0%, #ff6b6b 100%);
    color: white;
}

.deadline-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.deadline-time {
    color: var(--cyan-400);
    font-weight: 600;
}

.cd-info h4 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.cd-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.cd-timer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.time-unit {
    text-align: center;
    min-width: 55px;
}

.time-unit span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00b4d8 0%, #48cae4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.time-unit small {
    font-size: 0.75rem;
    color: var(--cyan-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
    display: block;
}

/* Tasks List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 10px;
    border-left: 4px solid var(--cyan-500);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.task-item:hover {
    transform: translateX(3px);
    background: rgba(0, 180, 216, 0.05);
    border-color: rgba(0, 180, 216, 0.3);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-content h5 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1rem;
}

.task-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--cyan-300);
}

.task-meta i {
    margin-right: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}

/* =========================================
   THREE COLUMN LAYOUT - MOBILE OPTIMIZED
   ========================================= */
.three-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* Piket Section */
.piket-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.piket-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 60px;
    padding: 10px 6px;
    border-radius: 8px;
    background: rgba(0, 180, 216, 0.05);
    border: 2px solid transparent;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: var(--cyan-500);
    color: white;
    border-color: var(--cyan-500);
}

.tab-btn.today {
    border-color: var(--success);
    background: rgba(6, 214, 160, 0.1);
}

.current-day {
    background: var(--gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.piket-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.piket-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    transition: all 0.3s ease;
    min-width: 0;
}

.piket-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan-400);
    flex-shrink: 0;
}

.piket-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.piket-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.piket-absen {
    font-size: 0.75rem;
    color: var(--cyan-300);
}

.piket-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.summary-item i {
    color: var(--cyan-400);
}

/* Jadwal Pelajaran */
.schedule-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-day {
    font-weight: 600;
    color: var(--cyan-400);
    font-size: 0.85rem;
    min-width: 70px;
    text-align: center;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    transition: all 0.3s ease;
    min-width: 0;
}

.schedule-item.active {
    background: rgba(0, 180, 216, 0.1);
    border-color: var(--cyan-400);
}

.schedule-time {
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.time-start {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan-400);
    font-family: 'Courier New', monospace;
}

.time-end {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.schedule-info {
    flex: 1;
    min-width: 0;
}

.schedule-subject {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.schedule-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Style untuk hari libur di jadwal pelajaran */
.schedule-holiday {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.schedule-holiday i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--cyan-300);
    opacity: 0.7;
}

.schedule-holiday h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.schedule-holiday p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Acara Sekolah */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    transition: all 0.3s ease;
}

.event-item:hover {
    transform: translateX(3px);
    border-color: var(--cyan-400);
}

.event-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.event-icon.exam {
    background: linear-gradient(135deg, #ef476f 0%, #ff6b6b 100%);
}

.event-icon.holiday {
    background: linear-gradient(135deg, #06d6a0 0%, #0a9396 100%);
}

.event-icon.school-event {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.event-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================================
   STUDENTS GRID
   ========================================= */
.two-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.student-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 180, 216, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.student-card:hover {
    border-color: var(--cyan-400);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.15);
}

.student-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan-400);
    margin-bottom: 10px;
    flex-shrink: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.student-card h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.2;
}

.student-card span {
    font-size: 0.8rem;
    color: var(--cyan-300);
    display: block;
    margin-bottom: 2px;
}

.student-card small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.student-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge colors for different statuses */
.student-badge.ketua-kelas {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.student-badge.wakil-ketua-kelas {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.student-badge.sekretaris {
    background: linear-gradient(135deg, #06d6a0 0%, #059669 100%);
}

.student-badge.bendahara {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.student-badge.keamanan {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.student-badge.kebersihan {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.search-box {
    position: relative;
    min-width: 150px;
    max-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Quick Links */
.quick-links .links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-link-btn {
    background: rgba(0, 180, 216, 0.05);
    border: 2px solid rgba(0, 180, 216, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
}

.quick-link-btn.cyan:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
}

.quick-link-btn i {
    font-size: 1.5rem;
}

.quick-link-btn span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-primary.cyan {
    background: var(--gradient);
}

.btn-primary.danger {
    background: linear-gradient(135deg, #ef476f 0%, #ff6b6b 100%);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.3);
}

.btn-primary.danger:hover {
    box-shadow: 0 8px 20px rgba(239, 71, 111, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--cyan-400);
    border: 2px solid var(--cyan-400);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-outline.cyan {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
}

.btn-outline.cyan:hover {
    background: var(--cyan-400);
    color: white;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef476f 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 71, 111, 0.3);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    color: var(--cyan-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-icon.cyan:hover {
    background: var(--cyan-400);
    color: white;
    border-color: var(--cyan-400);
}

.btn-icon.small {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--cyan-400);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-link.cyan:hover {
    color: var(--cyan-300);
}

/* Button Lihat Semua yang diperbagus */
.btn-view-all {
    background: linear-gradient(135deg, var(--cyan-400) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
}

.btn-view-all:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

.btn-view-all i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-view-all:hover i {
    transform: translateX(3px);
}

/* Button Aturan Piket yang diperbagus */
.btn-piket-rules {
    background: linear-gradient(135deg, var(--success) 0%, var(--cyan-400) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-piket-rules:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 214, 160, 0.4);
}

.btn-piket-rules:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

.btn-piket-rules i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-piket-rules:hover i {
    transform: rotate(15deg);
}

/* Back Button */
.btn-back {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-back:hover {
    background: var(--cyan-400);
    color: white;
    border-color: var(--cyan-400);
}

/* Tags */
.tag {
    background: rgba(0, 180, 216, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--cyan-400);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(0, 180, 216, 0.2);
    white-space: nowrap;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

.badge.cyan {
    background: var(--cyan-500);
}

.badge.teal {
    background: var(--success);
}

/* =========================================
   CONFIRMATION MODAL
   ========================================= */
.confirmation-modal {
    max-width: 350px;
    text-align: center;
    animation: modalScale 0.3s ease;
}

.confirmation-modal .modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: var(--cyan-400);
}

.confirmation-modal h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.confirmation-modal p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.confirmation-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* =========================================
   AVATAR PREVIEW MODAL
   ========================================= */
.avatar-preview-modal {
    max-width: 300px;
    text-align: center;
    padding: 25px;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.preview-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--cyan-400);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.3);
}

.preview-container h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
}

.preview-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.preview-info span {
    background: rgba(0, 180, 216, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--cyan-400);
}

/* =========================================
   PROFILE VIEW - MOBILE OPTIMIZED
   ========================================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.profile-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.profile-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
}

.profile-banner {
    padding: 20px;
    text-align: center;
    background: var(--gradient);
    position: relative;
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-avatar img:active {
    transform: scale(0.95);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.avatar-edit:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.4);
}

.profile-info h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 8px;
    line-height: 1.2;
}

.profile-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.profile-bio {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0 10px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan-400);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-actions {
    padding: 20px;
    text-align: center;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.detail-item i {
    font-size: 1.1rem;
    margin-top: 2px;
    color: var(--cyan-400);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.detail-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--cyan-300);
    margin-bottom: 4px;
}

.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--cyan-300);
}

/* =========================================
   MODALS
   ========================================= */
.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 41, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

.modal-bg.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.modal-lg {
    max-width: 600px;
}

.modal-chat {
    max-width: 500px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 70vh;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cyan-400);
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 0.9rem;
}

.close-modal:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.close-chat {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cyan-400);
    transition: all 0.3s ease;
}

.close-chat:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.close-notif-panel {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cyan-400);
    transition: all 0.3s ease;
}

.close-notif-panel:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Student Detail Modal */
.modal-card {
    max-width: 450px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.detail-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.detail-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--cyan-400);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.detail-avatar:active {
    transform: scale(0.95);
}

.avatar-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.avatar-status.online {
    background: var(--success);
}

.avatar-status.offline {
    background: var(--text-muted);
}

.detail-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.detail-content {
    padding: 15px 0;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.detail-info-item i {
    font-size: 1.1rem;
    color: var(--cyan-400);
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.detail-info-content {
    flex: 1;
    min-width: 0;
}

.detail-info-content small {
    display: block;
    font-size: 0.75rem;
    color: var(--cyan-300);
    margin-bottom: 4px;
}

.detail-info-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

/* =========================================
   CALENDAR IMPROVED WITH PERSONAL EVENTS
   ========================================= */
.calendar-header-with-close {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.calendar-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-controls h4 {
    font-size: 1.1rem;
    color: var(--cyan-400);
    min-width: 120px;
    text-align: center;
}

.calendar-close-desktop {
    display: none;
    align-items: center;
    gap: 10px;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-color.holiday {
    background: linear-gradient(135deg, #06d6a0 0%, #059669 100%);
}

.legend-color.exam {
    background: linear-gradient(135deg, #ef476f 0%, #ff6b6b 100%);
}

.legend-color.event {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
}

.legend-color.today {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.legend-color.personal {
    background: linear-gradient(135deg, var(--personal-red) 0%, #dc2626 100%);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.calendar-day-header {
    text-align: center;
    padding: 8px 2px;
    font-weight: 600;
    color: var(--cyan-400);
    font-size: 0.8rem;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    padding: 6px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-surface);
    position: relative;
}

.calendar-day:hover {
    transform: translateY(-2px);
    border-color: var(--cyan-400);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.15);
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.empty:hover {
    transform: none;
    border: none;
    box-shadow: none;
}

.calendar-day-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.calendar-day.today .calendar-day-number {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.calendar-day.holiday {
    background: rgba(6, 214, 160, 0.1);
    border-color: rgba(6, 214, 160, 0.3);
}

.calendar-day.exam {
    background: rgba(239, 71, 111, 0.1);
    border-color: rgba(239, 71, 111, 0.3);
}

.calendar-day.event {
    background: rgba(0, 180, 216, 0.1);
    border-color: rgba(0, 180, 216, 0.3);
}

.calendar-day.personal {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.calendar-day-events {
    margin-top: 4px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.calendar-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.calendar-event-dot.holiday {
    background: #06d6a0;
}

.calendar-event-dot.exam {
    background: #ef476f;
}

.calendar-event-dot.event {
    background: #00b4d8;
}

.calendar-event-dot.personal {
    background: var(--personal-red);
}

.calendar-event-dot.personal.blue { background: var(--personal-blue); }
.calendar-event-dot.personal.green { background: var(--personal-green); }
.calendar-event-dot.personal.purple { background: var(--personal-purple); }
.calendar-event-dot.personal.orange { background: var(--personal-orange); }
.calendar-event-dot.personal.pink { background: var(--personal-pink); }

.calendar-events, .calendar-personal-events {
    padding: 15px;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    margin-bottom: 10px;
}

.calendar-events h4, .calendar-personal-events h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.calendar-event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.calendar-event-dot-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-event-title {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
}

.calendar-event-date {
    font-size: 0.75rem;
    color: var(--cyan-300);
    flex-shrink: 0;
}

/* =========================================
   AVATAR EDITOR MODAL
   ========================================= */
.avatar-editor-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
}

.crop-container {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 180, 216, 0.05);
    padding: 10px;
}

.crop-area {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-surface);
}

.crop-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.crop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.zoom-control label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 50px;
}

.zoom-control input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.zoom-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cyan-400);
    cursor: pointer;
    border: none;
}

.zoom-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cyan-400);
    cursor: pointer;
    border: none;
}

#zoomValue {
    min-width: 30px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--cyan-300);
}

.rotate-controls {
    display: flex;
    gap: 8px;
}

.avatar-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.avatar-presets h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.preset-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-item:hover {
    border-color: var(--cyan-400);
    transform: scale(1.05);
}

.preset-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   CHAT MODAL IMPROVED
   ========================================= */
.chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    position: relative;
    flex-shrink: 0;
}

.chat-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.chat-status.online {
    background: var(--success);
}

.chat-status.offline {
    background: var(--text-muted);
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chat-members-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.chat-members-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.sidebar-header h5 {
    font-size: 1rem;
    color: var(--text-primary);
}

.members-list {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.member-item:hover {
    background: rgba(0, 180, 216, 0.05);
    border-color: rgba(0, 180, 216, 0.3);
}

.member-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan-400);
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-role {
    font-size: 0.7rem;
    color: var(--cyan-300);
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
    flex-shrink: 0;
}

.member-status.online {
    background: var(--success);
}

.member-status.offline {
    background: var(--text-muted);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    position: relative;
    background: rgba(0, 180, 216, 0.02);
    min-height: 0;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 15px;
    position: relative;
    animation: messageSlide 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.received {
    align-self: flex-start;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-bottom-left-radius: 4px;
}

.message.sent {
    align-self: flex-end;
    background: var(--gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--cyan-300);
}

.message.sent .message-sender {
    color: rgba(255, 255, 255, 0.8);
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.3;
}

.message-time {
    font-size: 0.7rem;
    text-align: right;
    margin-top: 4px;
    opacity: 0.7;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
    animation: fadeInOut 1.5s infinite;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan-400);
    animation: bounce 1.4s infinite;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.chat-input-container {
    padding: 15px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: 0 0 15px 15px;
    flex-shrink: 0;
}

.chat-input {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
}

.chat-input input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 6px 0;
    outline: none;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.chat-input input:focus {
    outline: none;
}

.input-actions {
    display: flex;
    gap: 4px;
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    font-size: 0.9rem;
}

.chat-input-info {
    text-align: center;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* =========================================
   NOTIFICATION PANEL IMPROVED
   ========================================= */
.modal-notifications {
    max-width: 400px;
    padding: 0;
    height: 65vh;
}

.notification-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
}

.notification-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-title h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: var(--text-primary);
}

.notification-count {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.notification-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notification-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
}

.notif-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.notif-tab.active {
    color: var(--cyan-400);
    border-bottom-color: var(--cyan-400);
    background: rgba(0, 180, 216, 0.05);
}

.notif-tab:hover:not(.active) {
    background: rgba(0, 180, 216, 0.02);
}

.notification-list {
    height: calc(100% - 120px);
    overflow-y: auto;
    flex: 1;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(0, 180, 216, 0.05);
}

.notification-item.unread {
    background: rgba(0, 180, 216, 0.1);
    border-left: 4px solid var(--cyan-400);
}

.notification-item.unread:hover {
    background: rgba(0, 180, 216, 0.15);
}

.notification-item.unread::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-400);
}

/* Style untuk notifikasi konfirmasi yang diperbagus */
.notification-item.confirmation {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-left: 4px solid var(--warning);
}

.notification-item.confirmation .notification-title-text {
    color: var(--warning);
}

.notification-item.danger {
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-left: 4px solid var(--danger);
}

.notification-item.danger .notification-title-text {
    color: var(--danger);
}

.notification-item.success {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-left: 4px solid var(--success);
}

.notification-item.success .notification-title-text {
    color: var(--success);
}

.notification-title-text {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.notification-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notification-empty {
    padding: 30px 15px;
    text-align: center;
    color: var(--text-muted);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none;
}

.notification-empty.active {
    display: flex;
}

.notification-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.9rem;
}

/* Notification actions */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-action-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    flex: 1;
}

.notification-action-btn.confirm {
    background: var(--success);
    color: white;
}

.notification-action-btn.confirm:hover {
    background: #05a085;
}

.notification-action-btn.cancel {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.notification-action-btn.cancel:hover {
    background: rgba(0, 180, 216, 0.1);
}

.notification-action-btn.danger {
    background: var(--danger);
    color: white;
}

.notification-action-btn.danger:hover {
    background: #dc2626;
}

/* =========================================
   FLOATING ACTION BUTTON
   ========================================= */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.fab-main {
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.fab-main:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 35px rgba(0, 180, 216, 0.5);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(19, 47, 76, 0.9);
    color: var(--cyan-400);
    border: 2px solid rgba(0, 180, 216, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.fab-item.cyan:hover {
    background: var(--cyan-500);
    color: white;
    transform: scale(1.1);
    border-color: var(--cyan-500);
}

/* =========================================
   TOAST & ALERT
   ========================================= */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 12px 35px var(--shadow);
    z-index: 2001;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 90vw;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.toast-content i {
    color: var(--success);
    font-size: 1.1rem;
}

.alert-notification {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 350px;
    max-width: calc(100vw - 30px);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 35px rgba(245, 158, 11, 0.3);
    z-index: 2002;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.alert-notification.show {
    transform: translateX(0);
}

.alert-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-body {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.alert-message {
    font-size: 0.85rem;
    opacity: 0.95;
    word-break: break-word;
}

.alert-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 0.9rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: rgba(19, 47, 76, 0.8);
    border-top: 1px solid rgba(0, 180, 216, 0.2);
    padding: 25px 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    width: 100%;
    flex-shrink: 0;
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--cyan-400);
    flex-shrink: 0;
}

.footer-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    line-height: 1.2;
}

.footer-text p {
    color: var(--cyan-300);
    font-size: 0.85rem;
}

.footer-copyright {
    color: var(--cyan-300);
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.3;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.1);
    color: var(--cyan-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(0, 180, 216, 0.2);
    flex-shrink: 0;
}

.footer-links a:hover {
    background: var(--cyan-500);
    color: white;
    transform: translateY(-3px);
    border-color: var(--cyan-500);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalScale {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 41, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(15px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 180, 216, 0.1);
    border-top-color: var(--cyan-400);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner p {
    color: var(--cyan-300);
    font-size: 1rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablet */
@media (min-width: 768px) {
    html { font-size: 15px; }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-brand {
        gap: 15px;
    }
    
    .nav-logo {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .brand-text h1 {
        font-size: 1.2rem;
    }
    
    .brand-text p {
        font-size: 0.8rem;
    }
    
    .datetime-widget {
        display: flex;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .user-info {
        display: flex;
    }
    
    .nav-user {
        padding: 8px 12px;
        gap: 10px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .main-container {
        padding: 20px;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .card {
        padding: 20px;
        border-radius: 18px;
    }
    
    .three-column {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .three-column > * {
        flex: 1;
        min-width: 300px;
    }
    
    .two-column {
        flex-direction: row;
    }
    
    .two-column > * {
        flex: 1;
    }
    
    .students-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .quick-links .links-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .profile-container {
        flex-direction: row;
    }
    
    .profile-details {
        flex: 1;
    }
    
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-box {
        padding: 25px;
    }
    
    .fab-container {
        bottom: 25px;
        right: 25px;
    }
    
    .desktop-only {
        display: flex !important;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    html { font-size: 16px; }
    
    .main-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .nav-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .three-column {
        flex-wrap: nowrap;
    }
    
    .avatar-editor-container {
        flex-direction: row;
    }
    
    .crop-container {
        flex: 2;
    }
    
    .avatar-options {
        flex: 1;
    }
    
    /* Tampilkan tombol close di kalender untuk desktop */
    .calendar-close-desktop {
        display: flex !important;
    }
    
    /* Sembunyikan tombol close X di modal kalender */
    .close-modal.desktop-only {
        display: none !important;
    }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-height: 600px) {
    .nav-spacer {
        height: 60px;
    }
    
    .navbar {
        height: 60px;
    }
    
    .main-container {
        min-height: calc(100vh - 60px - var(--fab-size) - 40px);
        padding: 10px 15px;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stat-card {
        padding: 12px;
        min-height: 70px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    .welcome-card {
        padding: 15px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .piket-list {
        max-height: 150px;
    }
    
    .schedule-list {
        max-height: 150px;
    }
    
    .events-list {
        max-height: 150px;
    }
    
    .students-grid {
        max-height: 200px;
    }
    
    .fab-container {
        bottom: 15px;
        right: 15px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    .main-container {
        padding: 30px 20px;
        gap: 25px;
    }
    
    .card {
        padding: 25px;
        border-radius: 20px;
    }
    
    .three-column > * {
        min-width: 0;
    }
}

/* Print */
@media print {
    .fab-container,
    .nav-btn,
    .modal-bg {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-btn:hover,
    .btn-primary:hover,
    .btn-outline:hover,
    .student-card:hover,
    .event-item:hover,
    .task-item:hover,
    .schedule-item:hover,
    .piket-item:hover,
    .quick-link-btn:hover,
    .fab-item:hover {
        transform: none !important;
    }
    
    .nav-btn:active,
    .btn-primary:active,
    .btn-outline:active {
        transform: scale(0.95) !important;
    }
    
    .tab-btn,
    .notif-tab {
        min-height: 44px;
    }
    
    input, select, textarea, button {
        font-size: 16px !important;
    }
    
    /* Hold untuk avatar preview */
    .profile-avatar img,
    .detail-avatar,
    .student-card img {
        -webkit-tap-highlight-color: transparent;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .stat-icon,
    .event-icon,
    .activity-icon {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0a1929;
        --bg-secondary: #132f4c;
        --bg-surface: #1e4976;
        --text-primary: #e0f7fa;
        --text-secondary: #80deea;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   PERBAIKAN TAMBAHAN
   ========================================= */

/* Fix untuk welcome text */
.welcome-text {
    flex: 1;
    min-width: 0;
}

/* Fix untuk piket summary di mobile */
.piket-summary {
    flex-wrap: wrap;
    gap: 8px;
}

/* Fix untuk detail item */
.detail-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--cyan-300);
    margin-bottom: 4px;
}

/* Fix untuk student badge */
.student-badge {
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix untuk calendar day events */
.calendar-day-events {
    flex-wrap: wrap;
    justify-content: center;
}

/* Fix untuk avatar editor */
.crop-area {
    min-height: 200px;
    background: var(--bg-surface);
}

/* Fix untuk loading overlay */
.loading-overlay {
    background: rgba(10, 25, 41, 0.98);
}

/* Fix untuk modal scroll */
.modal-box {
    -webkit-overflow-scrolling: touch;
}

/* Fix untuk mobile scrolling */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .main-container {
        overflow-x: hidden;
    }
}

/* Fix untuk landscape orientation */
@media (orientation: landscape) {
    .modal-box {
        max-height: 80vh;
    }
    
    .modal-chat {
        height: 60vh;
    }
}

/* Fix untuk iOS input styling */
input, textarea, select, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Khusus untuk select */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300b4d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Placeholder styling */
::placeholder {
    color: var(--cyan-300);
    opacity: 0.7;
}

::-webkit-input-placeholder {
    color: var(--cyan-300);
    opacity: 0.7;
}

::-moz-placeholder {
    color: var(--cyan-300);
    opacity: 0.7;
}

:-ms-input-placeholder {
    color: var(--cyan-300);
    opacity: 0.7;
}

:-moz-placeholder {
    color: var(--cyan-300);
    opacity: 0.7;
}

/* Fix untuk iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    body, #loginOverlay {
        min-height: -webkit-fill-available;
    }
    
    .main-container {
        min-height: -webkit-fill-available;
    }
}

/* Fix untuk input zoom di iOS */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
    
    .btn-primary, .btn-outline, .btn-secondary, .btn-danger, .btn-login {
        min-height: 44px;
    }
    
    .nav-btn, .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Fix untuk scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 180, 216, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--cyan-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-500);
}
