/* =========================================================
   Kalender Kegiatan Sekolah - tema "School Events"
   ========================================================= */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    --pink: #ec4899;
    --teal: #14b8a6;
    --ink: #1f2937;
    --muted: #6b7280;
    --bg: #f5f6fb;
    --card: #ffffff;
    --radius: 16px;
}

body {
    font-family: 'Poppins', -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--primary); }
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #d97706; color: #fff; }
.form-control { border-radius: 10px; border-color: #e5e7eb; min-height: 44px; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(79,70,229,.15); }
label { font-weight: 500; font-size: .875rem; color: #374151; }

/* ---------------------------------------------------------- AUTH */
.auth-wrap { display: flex; min-height: 100vh; }
.auth-hero {
    flex: 1 1 55%;
    position: relative; overflow: hidden;
    color: #fff;
    padding: 56px 64px;
    background:
        radial-gradient(circle at 15% 20%, rgba(236,72,153,.55), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(20,184,166,.55), transparent 45%),
        linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero .brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.1rem; }
.auth-hero .brand .logo {
    width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.18);
    display: grid; place-items: center; backdrop-filter: blur(4px);
}
.auth-hero h1 { font-weight: 700; font-size: 2.6rem; line-height: 1.15; margin: 32px 0 12px; }
.auth-hero h1 span { color: #fde68a; }
.auth-hero p.lead { opacity: .85; font-size: 1rem; max-width: 460px; }
.auth-hero .events-title { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin: 28px 0 12px; }

/* confetti dekoratif */
.confetti { position: absolute; border-radius: 4px; opacity: .8; animation: floaty 7s ease-in-out infinite; }
.confetti.c1 { width: 14px; height: 14px; background: #fde68a; top: 12%; right: 18%; transform: rotate(20deg); }
.confetti.c2 { width: 10px; height: 22px; background: #f9a8d4; top: 30%; right: 8%; animation-delay: 1s; }
.confetti.c3 { width: 18px; height: 18px; background: #5eead4; border-radius: 50%; top: 62%; right: 26%; animation-delay: 2s; }
.confetti.c4 { width: 12px; height: 12px; background: #fff; top: 8%; left: 48%; animation-delay: 3s; }
.confetti.c5 { width: 8px; height: 20px; background: #fde68a; bottom: 14%; left: 40%; animation-delay: 1.5s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(25deg); } }

.hero-calendar { position: absolute; right: -40px; bottom: -30px; width: 340px; opacity: .14; }

.glass-event {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(6px);
    border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; max-width: 460px;
}
.glass-event .date-tile { background: #fff; color: var(--ink); }
.glass-event .title { font-weight: 500; line-height: 1.25; }
.glass-event small { opacity: .8; }

.auth-panel {
    flex: 1 1 45%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px; background: #fff;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-weight: 700; margin-bottom: 4px; }
.auth-box .sub { color: var(--muted); margin-bottom: 28px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.input-icon .form-control { padding-left: 42px; }
.auth-box .btn-lg { padding: 12px; font-size: 1rem; }
.divider-text { text-align: center; color: var(--muted); font-size: .875rem; margin-top: 24px; }

@media (max-width: 991.98px) {
    .auth-wrap { flex-direction: column; }
    .auth-hero { padding: 32px 24px; flex: none; }
    .auth-hero h1 { font-size: 1.8rem; margin-top: 20px; }
    .auth-hero .hide-sm { display: none; }
}

/* ---------------------------------------------------------- DATE TILE */
.date-tile {
    flex: 0 0 auto; width: 56px; border-radius: 12px; text-align: center; overflow: hidden;
    background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.date-tile .m { display: block; font-size: .68rem; font-weight: 600; text-transform: uppercase; color: #fff; padding: 2px 0; background: var(--pink); }
.date-tile .d { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.6; }

/* ---------------------------------------------------------- APP LAYOUT */
.app-nav { background: #fff; box-shadow: 0 1px 0 #eceef5; }
.app-nav .navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.app-nav .navbar-brand .logo {
    width: 38px; height: 38px; border-radius: 10px; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    display: grid; place-items: center;
}
.app-nav .navbar-brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); line-height: 1; }
.app-nav .nav-link { color: #4b5563; font-weight: 500; border-radius: 10px; padding: .45rem .9rem !important; margin: 0 2px; }
.app-nav .nav-link:hover { color: var(--primary); background: #eef2ff; }
.app-nav .nav-item.active .nav-link { color: var(--primary); background: #eef2ff; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; font-weight: 600; font-size: .9rem;
}
.role-badge { font-size: .68rem; padding: 3px 8px; border-radius: 20px; background: #eef2ff; color: var(--primary); font-weight: 600; }
.role-badge.admin { background: #fef3c7; color: #b45309; }

.card { border: 0; border-radius: var(--radius); box-shadow: 0 4px 18px rgba(31,41,55,.06); }
.page-title { font-weight: 700; }

/* hero dashboard */
.hero-banner {
    position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 32px;
    background:
        radial-gradient(circle at 90% 10%, rgba(253,230,138,.45), transparent 35%),
        radial-gradient(circle at 10% 100%, rgba(236,72,153,.5), transparent 40%),
        linear-gradient(120deg, #4338ca, #6d28d9);
}
.hero-banner h3 { font-weight: 700; }
.hero-banner p { opacity: .9; margin-bottom: 0; }
.hero-banner .hero-art { position: absolute; right: 24px; bottom: -6px; width: 190px; }
@media (max-width: 767.98px) { .hero-banner .hero-art { display: none; } }

.stat-card { display: flex; align-items: center; gap: 16px; padding: 20px; }
.stat-card .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.stat-card .num { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-card .lbl { color: var(--muted); font-size: .85rem; }
.ico-indigo { background: #eef2ff; color: var(--primary); }
.ico-amber  { background: #fef3c7; color: #d97706; }
.ico-pink   { background: #fce7f3; color: #db2777; }
.ico-teal   { background: #ccfbf1; color: #0f766e; }

.event-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px dashed #e5e7eb; }
.event-item:last-child { border-bottom: 0; }
.event-item .title { font-weight: 600; }
.event-item .meta { color: var(--muted); font-size: .82rem; }
.pill { font-size: .72rem; padding: 3px 10px; border-radius: 20px; background: #f3f4f6; color: #4b5563; white-space: nowrap; }
.pill.now { background: #dcfce7; color: #15803d; }

.empty-state { text-align: center; color: var(--muted); padding: 32px 0; }

/* tabel & kalender */
.table thead th { border-top: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbff; }
.color-dot { display:inline-block; width:12px; height:12px; border-radius:50%; vertical-align:middle; }
#calendar { background: #fff; padding: 16px; border-radius: var(--radius); box-shadow: 0 4px 18px rgba(31,41,55,.06); }
.fc .fc-toolbar-title { font-weight: 700; font-size: 1.3rem; }
.fc .fc-button-primary { background: var(--primary); border-color: var(--primary); border-radius: 8px; text-transform: capitalize; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.fc .fc-day-today { background: #fef9c3 !important; }
.fc-event { border-radius: 6px; padding: 1px 4px; cursor: pointer; }
.nav-tabs { border-bottom: 0; }
.nav-tabs .nav-link { border: 0; border-radius: 10px; color: var(--muted); font-weight: 500; }
.nav-tabs .nav-link.active { background: var(--primary); color: #fff; }
.alert { border: 0; border-radius: 12px; }
