/* ==========================================================================
   CARDBOARD COSMOS DESIGN SYSTEM - DASHBOARD & GLOBAL APP CSS
   CareTech Scrapbook & Cardboard Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Press+Start+2P&display=swap');

@font-face {
    font-family: 'GROBOLD';
    src: local('GROBOLD'), local('Grobold'), url('assets/fonts/GROBOLD.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Exact Color Tokens from Cardboard Cosmos */
    --ink: #000000;
    --pink: #ff2e93;
    --lime: #39ff14;
    --sun: #ffe500;
    --cy: #00e5ff;
    --orange: #ff8a00;
    --purple: #9b5cff;
    --red: #ff3b30;
    
    /* Cardboard & Paper Palette */
    --cardboard: #e5d9c5;
    --kraft: #c8964f;
    --kraft-dark: #8a5a24;
    --paper: #ffffff;
    --paper-warm: #fffdf5;
    --paper-blue: #f0faff;
    --paper-pink: #fff3f8;
    --paper-yellow: #fffde6;

    /* Legacy Theme Variable Aliases for Complete Compatibility */
    --primary-color: var(--cy);
    --secondary-color: var(--lime);
    --text-color: var(--ink);
    --glass-bg: #ffffff;
    --glass-border: var(--ink);
    --glass-shadow: 6px 6px 0 var(--ink);

    /* Typography */
    --mk: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --body-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Courier New', Courier, monospace;
    --imp: 'GROBOLD', 'Grobold', sans-serif;
    --title-font: 'GROBOLD', 'Grobold', sans-serif;

    /* Layout */
    --sidebar-width: 290px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--ink);
    font: 700 1.12rem/1.5 var(--mk);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    /* The Authentic Cardboard Cosmos Background */
    background:
        linear-gradient(90deg, transparent 0 62px, rgba(230, 30, 70, 0.55) 62px 65px, transparent 65px),
        linear-gradient(112deg, transparent 0 31%, rgba(60, 30, 0, 0.1) 31% 31.3%, transparent 31.3%),
        linear-gradient(64deg, transparent 0 66%, rgba(255, 255, 255, 0.45) 66% 66.4%, transparent 66.4%),
        repeating-linear-gradient(0deg, transparent 0 33px, rgba(40, 110, 220, 0.3) 33px 35px),
        radial-gradient(rgba(90, 55, 15, 0.25) 1px, transparent 1.6px) 0 0/7px 9px,
        radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 2px) 3px 4px/11px 13px,
        var(--cardboard);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'GROBOLD', 'Grobold', var(--imp);
    letter-spacing: 0.03em;
    color: var(--ink);
    font-weight: 400;
}

/* Jagged Hand-Drawn Borders & Corners */
.mk {
    border: 4px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
}

.mk-alt {
    border: 4px solid var(--ink) !important;
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px !important;
}

.mk-wobbly {
    border: 4px solid var(--ink) !important;
    border-radius: 20px 255px 20px 240px/240px 20px 250px 20px !important;
}

.mk-sticker {
    border: 4px solid var(--ink) !important;
    border-radius: 52% 48% 50% 50%/48% 52% 48% 52% !important;
}

/* Decorative Tapes */
.tape {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 1.6rem;
    background: rgba(255, 229, 0, 0.95);
    color: var(--ink);
    border: 0 dotted rgba(0, 0, 0, 0.35);
    border-width: 0 8px;
    transform: rotate(-3deg);
    font: 700 1rem var(--mono);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    user-select: none;
}

.tape-pink {
    background: var(--pink) !important;
    color: #fff !important;
    transform: rotate(2.5deg);
}

.tape-cyan {
    background: var(--cy) !important;
    color: var(--ink) !important;
    transform: rotate(-2.5deg);
}

.tape-lime {
    background: var(--lime) !important;
    color: var(--ink) !important;
    transform: rotate(1.8deg);
}

.tape-white {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 2px dashed rgba(0, 0, 0, 0.3) !important;
    color: var(--ink) !important;
}

/* Tape Section Headings */
h2.tape, .tape-heading {
    font: 400 clamp(1.8rem, 4vw, 2.3rem)/1.15 var(--imp);
    padding: 0.45rem 1.8rem;
    box-shadow: 4px 4px 0 var(--ink);
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
}

/* Sticky Note Containers */
.note {
    position: relative;
    padding: 2.2rem 2rem 2rem;
    background: var(--lime);
    border: 4px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    transform: rotate(-2deg);
    box-shadow: 10px 10px 0 var(--ink);
}

.teacher-note-card {
    background: var(--paper-warm);
    border: 4px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    padding: 1.8rem;
    box-shadow: 6px 6px 0 var(--ink);
    position: relative;
    margin-bottom: 1.2rem;
    transform: rotate(-0.5deg);
}

.teacher-note-card:nth-child(even) {
    transform: rotate(1deg);
    background: #fffbef;
}

.note::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    width: 140px;
    height: 34px;
    margin-left: -70px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(0, 0, 0, 0.35);
    transform: rotate(3deg);
    z-index: 2;
}

.note::after {
    content: 'CATATAN!';
    position: absolute;
    right: -10px;
    bottom: -18px;
    padding: 0.15rem 0.9rem;
    background: var(--pink);
    color: #fff;
    border: 3px solid var(--ink);
    font: 400 1.25rem var(--imp);
    transform: rotate(6deg);
    box-shadow: 4px 4px 0 var(--ink);
}

/* Space & Pixel Doodles */
.star {
    position: absolute;
    width: 8px;
    height: 8px;
    color: var(--sun);
    background: currentColor;
    box-shadow: 8px 0, -8px 0, 0 8px, 0 -8px;
    filter: drop-shadow(3px 3px 0 var(--ink));
    animation: tw 1.6s steps(2) infinite;
    pointer-events: none;
}

@keyframes tw {
    50% { opacity: 0.2; }
}

/* ==========================================================================
   LAYOUT STRUCTURE (Dashboard Container, Sidebar, Main Content)
   ========================================================================== */

.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar (Scrapbook Binder / Cardboard Tab Rail) */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 2.2rem 1.3rem;
    background: #f8efe0;
    border-right: 5px solid var(--ink);
    box-shadow: 8px 0 0 rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 4px;
    border-left: 2px dashed rgba(138, 90, 36, 0.4);
    pointer-events: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 4px dashed var(--ink);
    transform: rotate(-1.5deg);
}

.sidebar-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: var(--paper);
    padding: 6px;
    border: 3px solid var(--ink);
    border-radius: 50%;
    box-shadow: 4px 4px 0 var(--ink);
    transform: rotate(-4deg);
}

.sidebar-header h2 {
    font: 400 2.2rem/1 var(--imp);
    color: var(--ink);
    text-shadow: 3px 3px 0 var(--sun);
    letter-spacing: 0.04em;
    margin: 0;
}

.sidebar-close-btn {
    display: none;
    margin-left: auto;
    background: var(--pink);
    color: #ffffff;
    border: 2.5px solid var(--ink);
    border-radius: 8px;
    box-shadow: 2px 2px 0 var(--ink);
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease, background 0.15s ease;
}

.sidebar-close-btn:hover {
    background: var(--sun);
    color: var(--ink);
    transform: scale(1.08);
}

.sidebar-close-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.sidebar-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.section-title {
    display: inline-block !important;
    font: 700 0.88rem var(--mono);
    text-transform: uppercase;
    color: var(--ink);
    background: var(--sun);
    padding: 0.2rem 0.8rem;
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    transform: rotate(-2deg);
    margin-bottom: 0.9rem;
    align-self: flex-start;
}

.hiburan-section .section-title {
    background: var(--pink);
    color: #fff;
    transform: rotate(2deg);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Scrapbook Menu Items */
.menu-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    background: var(--paper);
    border: 3px solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    font: 700 1.05rem var(--mk);
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    transform: rotate(-1deg);
}

.menu-item:nth-child(even) a {
    transform: rotate(1.2deg);
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px;
}

.menu-item a:hover {
    background: var(--lime) !important;
    transform: scale(1.04) rotate(-0.5deg) !important;
    box-shadow: 6px 6px 0 var(--ink) !important;
}

.menu-item a:active {
    transform: translate(3px, 3px) rotate(-1deg) !important;
    box-shadow: 1px 1px 0 var(--ink) !important;
}

.menu-item.active > a {
    background: var(--sun) !important;
    transform: scale(1.05) rotate(2deg) !important;
    box-shadow: 6px 6px 0 var(--ink) !important;
    border-color: var(--ink) !important;
}

.menu-item .icon {
    display: inline-block !important;
    font-size: 1.3rem;
    margin-right: 0.7rem;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.2));
}

.menu-item a::before {
    display: none !important;
}

/* Dropdown Menu inside Sidebar */
.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown-menu {
    display: none;
    list-style: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.8rem 0.6rem 0.8rem 1.2rem;
    background: #fffbef;
    border: 3px dashed var(--ink);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--ink);
    transform: rotate(1deg);
}

.has-dropdown.active-dropdown .dropdown-menu {
    display: flex;
}

.dropdown-menu li a {
    padding: 0.5rem 0.8rem;
    font: 700 0.95rem var(--mono);
    background: #ffffff;
    border: 2px solid var(--ink);
    border-radius: 6px;
    color: var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    transform: rotate(-1deg);
}

.dropdown-menu li a:hover {
    background: var(--cy);
    transform: scale(1.05) rotate(1deg);
}

.dropdown-menu li a.active-subitem {
    background: var(--pink) !important;
    color: #fff !important;
    box-shadow: 3px 3px 0 var(--ink);
    transform: scale(1.04) rotate(-2deg);
}

.dropdown-icon {
    transition: transform 0.2s ease;
    font-family: var(--mono);
    font-weight: bold;
}

.has-dropdown.active-dropdown .dropdown-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   MAIN CONTENT AREA & TOP HEADER
   ========================================================================== */

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header (Cutout Tape Banner) */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--paper-warm);
    border-bottom: 5px solid var(--ink);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.greeting h1 {
    font: 400 clamp(2rem, 5vw, 3rem)/1.1 var(--imp);
    color: var(--ink);
    margin-bottom: 0.2rem;
    text-shadow: 3px 3px 0 var(--sun);
    transform: rotate(-1deg);
}

.greeting p {
    font: 700 1.05rem var(--mk);
    color: #333;
    transform: rotate(0.5deg);
}

/* Avatar Styled as Round Sticker & Dropdown Menu */
.user-profile {
    position: relative;
    z-index: 100;
}

.avatar-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
    line-height: 0;
}

.avatar-btn:focus-visible .avatar {
    outline: 3.5px dashed var(--pink);
    outline-offset: 6px;
}

.avatar-btn:hover .avatar {
    transform: scale(1.08) rotate(-4deg);
}

.avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--ink);
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 8px var(--ink), 6px 6px 0 8px var(--ink);
    transform: rotate(3deg);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.avatar:hover {
    transform: scale(1.08) rotate(-4deg);
}

/* Profile Dropdown (Cardboard Cosmos) */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 220px;
    max-width: calc(100vw - 32px);
    background: var(--paper-warm, #fffdf8);
    border: 3.5px solid var(--ink);
    border-radius: 16px;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 1rem 0.9rem 0.75rem;
    z-index: 1000;
    display: none;
    text-align: left;
    transform-origin: top right;
    animation: dropdownPop 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-dropdown.show {
    display: block;
}

.dropdown-tape {
    font-size: 0.7rem !important;
    padding: 0.15rem 0.6rem !important;
    margin-bottom: 0.4rem !important;
    display: inline-block;
}

.dropdown-student-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.12rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.dropdown-student-meta {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: #555555;
}

.profile-dropdown-divider {
    height: 0;
    border-top: 2.5px dashed var(--ink);
    margin: 0.75rem 0 0.65rem 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    font-family: var(--mono);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.15s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.profile-dropdown-item:last-child {
    margin-bottom: 0;
}

.profile-dropdown-item:hover {
    background: #ffffff;
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    transform: translate(-1px, -1px);
}

.profile-dropdown-item.logout-item {
    color: #dc2626;
}

.profile-dropdown-item.logout-item:hover {
    background: var(--pink);
    color: #ffffff;
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

/* ==========================================================================
   CARDS & PANELS (Scrapbook Cards, Jagged Borders, Solid Shadows)
   ========================================================================== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.2rem;
    padding: 2.5rem;
}

.wide-card {
    grid-column: 1 / -1;
}

/* Universal Dashboard Scrapbook Card */
.dashboard-card, .glass-panel {
    background: var(--paper) !important;
    border: 4px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 8px 8px 0 var(--ink) !important;
    padding: 2.2rem !important;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Alternating subtle card tilts */
.dashboard-card:nth-child(even) {
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px !important;
}

.dashboard-card h2, .glass-panel h2 {
    font: 400 clamp(1.6rem, 3.5vw, 2.3rem)/1.1 var(--imp);
    color: var(--ink);
    margin-bottom: 1.2rem;
    transform: rotate(-1deg);
    text-shadow: 2px 2px 0 var(--sun);
}

.dashboard-card h3, .glass-panel h3 {
    font: 400 clamp(1.3rem, 3vw, 1.8rem)/1.2 var(--imp);
    color: var(--ink);
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}

/* Profile Welcome Wide Card */
.profile-card {
    background: var(--paper-yellow) !important;
    border: 5px solid var(--ink) !important;
    box-shadow: 10px 10px 0 var(--ink) !important;
    transform: rotate(-0.5deg);
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--ink);
    box-shadow: 0 0 0 5px #ffffff, 0 0 0 9px var(--ink), 6px 6px 0 9px var(--ink);
    transform: rotate(-3deg);
}

.stat-pill {
    background: #ffffff;
    border: 3px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    padding: 1rem 1.6rem;
    box-shadow: 4px 4px 0 var(--ink);
    text-align: center;
    transform: rotate(1deg);
    transition: transform 0.2s ease;
}

.stat-pill:nth-child(2) {
    transform: rotate(-1.5deg);
    background: var(--paper-blue);
}

.stat-pill:nth-child(3) {
    transform: rotate(2deg);
    background: var(--paper-pink);
}

.stat-pill:hover {
    transform: scale(1.08) rotate(0deg);
}

.stat-number {
    font: 400 2.5rem/1 var(--imp);
    color: var(--ink);
    margin-bottom: 0.2rem;
    text-shadow: 2px 2px 0 var(--sun);
}

.stat-label {
    font: 700 0.95rem var(--mono);
    text-transform: uppercase;
    color: #333;
}

/* ==========================================================================
   INTERACTIVE CARDS (Progress Items, Comics, Modules)
   ========================================================================== */

.interactive-card {
    cursor: pointer;
    background: #ffffff !important;
    border: 4px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 7px 7px 0 var(--ink) !important;
    transition: transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.18s ease, background 0.18s ease;
    position: relative;
    overflow: hidden;
}

.interactive-card:hover {
    transform: scale(1.04) rotate(-1.5deg) !important;
    box-shadow: 11px 11px 0 var(--ink) !important;
}

.interactive-card:active {
    transform: translate(4px, 4px) rotate(0deg) !important;
    box-shadow: 2px 2px 0 var(--ink) !important;
}

/* Progress Circular Badge */
.progress-sticker {
    width: 90px;
    height: 90px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--sun);
    border: 4px solid var(--ink);
    display: flex;
    justify-content: center;
    align-items: center;
    font: 400 1.8rem var(--imp);
    color: var(--ink);
    box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--ink), 6px 6px 0 9px var(--ink);
    transform: rotate(5deg);
    transition: transform 0.2s ease;
}

.interactive-card:hover .progress-sticker {
    transform: scale(1.12) rotate(-8deg);
    background: var(--lime);
}

/* Comic Grid Card */
.comic-card {
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--paper-warm) !important;
}

.comic-card img {
    border: 3px solid var(--ink) !important;
    border-radius: 8px !important;
    box-shadow: 4px 4px 0 var(--ink) !important;
    transform: rotate(-2deg);
    transition: transform 0.2s ease;
}

.comic-card:hover img {
    transform: scale(1.05) rotate(2deg);
}

.comic-card.locked {
    opacity: 0.75;
    filter: grayscale(0.5);
    background: #eae3d5 !important;
    cursor: not-allowed;
}

.comic-card.locked:hover {
    transform: none !important;
    box-shadow: 7px 7px 0 var(--ink) !important;
}

.lock-badge {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(6deg);
    font-size: 3rem;
    filter: drop-shadow(4px 4px 0 var(--ink));
}

/* Module Strip Card */
.module-strip {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    background: #ffffff !important;
    border: 4px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 6px 6px 0 var(--ink) !important;
    padding: 1.6rem !important;
    transform: rotate(0.3deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-strip:nth-child(even) {
    transform: rotate(-0.5deg);
}

.module-strip:hover {
    transform: scale(1.02) rotate(-1deg);
    box-shadow: 10px 10px 0 var(--ink) !important;
}

.module-strip img {
    width: 120px;
    height: auto;
    border: 3px solid var(--ink);
    border-radius: 6px;
    box-shadow: 4px 4px 0 var(--ink);
    transform: rotate(-2deg);
}

/* ==========================================================================
   ALUR EVALUASI & PERMAINAN (Cardboard Stepper Flow)
   ========================================================================== */

.flow-container {
    display: flex;
    gap: 1.8rem;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    padding: 1rem 0;
}

.flow-card {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.2rem 1.5rem;
    text-decoration: none;
    color: var(--ink);
    border: 4px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    box-shadow: 8px 8px 0 var(--ink);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flow-card.step-1 {
    background: var(--paper-yellow);
    transform: rotate(-2deg);
}

.flow-card.step-2 {
    background: var(--paper-blue);
    transform: rotate(1.5deg);
}

.flow-card.step-3 {
    background: var(--paper-pink);
    transform: rotate(-1.5deg);
}

.flow-card:hover {
    transform: scale(1.06) rotate(0deg) !important;
    box-shadow: 12px 12px 0 var(--ink) !important;
}

.flow-card:active {
    transform: translate(4px, 4px) rotate(0deg) !important;
    box-shadow: 2px 2px 0 var(--ink) !important;
}

.flow-card .step-badge {
    display: inline-block;
    padding: 0.3rem 1.2rem;
    font: 400 1.25rem var(--imp);
    background: var(--ink);
    color: var(--sun);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--pink);
    transform: rotate(-3deg);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.flow-card .step-num {
    display: block;
    font: 400 clamp(2.8rem, 6vw, 3.8rem)/1 var(--imp);
    color: var(--ink);
    margin-bottom: 0.3rem;
    letter-spacing: 0.04em;
    transform: rotate(-3deg);
    transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.flow-card:hover .step-num {
    transform: scale(1.15) rotate(2deg);
}

.flow-card h4 {
    font: 400 2rem/1 var(--imp);
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.flow-card p {
    font: 700 1rem var(--mono);
    color: #444;
}

.flow-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    font: 400 2.8rem var(--imp);
    color: var(--ink);
    filter: drop-shadow(3px 3px 0 var(--sun));
    user-select: none;
}

/* ==========================================================================
   BUTTONS (Chunky Hand-Drawn Buttons with Block Shadows & Push Effect)
   ========================================================================== */

.btn, .btn-small, .btn-start, .btn-next {
    display: inline-block;
    color: var(--ink);
    font: 400 1.35rem var(--imp);
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
    border: 4px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    box-shadow: 6px 6px 0 var(--ink);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    text-align: center;
}

.btn-small {
    padding: 0.5rem 1.4rem;
    font-size: 1.15rem;
    background: var(--sun);
    transform: rotate(-1.5deg);
}

.btn-small:hover {
    background: var(--lime);
    transform: scale(1.08) rotate(1.5deg);
}

.btn-small:active {
    transform: translate(3px, 3px) rotate(-1.5deg) !important;
    box-shadow: 2px 2px 0 var(--ink) !important;
}

.btn-start {
    padding: 0.9rem 2.5rem;
    font-size: 1.7rem;
    background: var(--pink);
    color: #fff;
    transform: rotate(-2deg);
    box-shadow: 8px 8px 0 var(--ink);
}

.btn-start:hover {
    background: var(--lime);
    color: var(--ink);
    transform: scale(1.06) rotate(2deg);
}

.btn-start:active {
    transform: translate(4px, 4px) rotate(-2deg) !important;
    box-shadow: 2px 2px 0 var(--ink) !important;
}

.btn-next {
    padding: 0.8rem 2.2rem;
    background: var(--sun);
    transform: rotate(-1deg);
}

.btn-next:hover {
    background: var(--lime);
    transform: scale(1.06) rotate(2deg);
}

.btn-next:active {
    transform: translate(4px, 4px) rotate(-1deg) !important;
    box-shadow: 2px 2px 0 var(--ink) !important;
}

/* ==========================================================================
   QUIZ & EVALUATION COMPONENTS (Pretest & Posttest)
   ========================================================================== */

#quiz-container {
    background: var(--paper-warm) !important;
    border: 4px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 8px 8px 0 var(--ink) !important;
    padding: 2.5rem !important;
    position: relative;
    transform: rotate(0.4deg);
}

#quiz-container::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 40px;
    width: 120px;
    height: 32px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(0, 0, 0, 0.35);
    transform: rotate(-3deg);
}

.quiz-option {
    display: flex !important;
    align-items: center !important;
    padding: 1.1rem 1.4rem !important;
    background: #ffffff !important;
    border: 3px solid var(--ink) !important;
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px !important;
    cursor: pointer !important;
    box-shadow: 4px 4px 0 var(--ink) !important;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
    margin-bottom: 0.75rem;
    user-select: none;
    font-family: var(--mk) !important;
    font-size: 1.05rem !important;
}

.quiz-option:nth-child(even) {
    transform: rotate(0.6deg);
}

.quiz-option:nth-child(odd) {
    transform: rotate(-0.6deg);
}

.quiz-option:hover {
    background: var(--paper-yellow) !important;
    transform: scale(1.02) rotate(-1deg) !important;
    box-shadow: 6px 6px 0 var(--ink) !important;
}

.quiz-option:has(input:checked) {
    background: var(--sun) !important;
    border: 4px solid var(--ink) !important;
    transform: translateX(8px) scale(1.03) rotate(-1deg) !important;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 8px var(--ink), 7px 7px 0 8px var(--ink) !important;
    font-weight: 800 !important;
}

.quiz-option input[type="radio"] {
    accent-color: var(--pink);
    transform: scale(1.4);
    margin-right: 1.2rem;
}

/* Essay Textarea */
#options-container textarea {
    width: 100%;
    min-height: 160px;
    padding: 1.2rem;
    border: 4px solid var(--ink);
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px;
    background: #ffffff;
    font-family: var(--mk);
    font-size: 1.1rem;
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    outline: none;
    line-height: 1.6;
    background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(0, 229, 255, 0.3) 31px, rgba(0, 229, 255, 0.3) 33px);
}

#options-container textarea:focus {
    background-color: #fffef5;
    box-shadow: 7px 7px 0 var(--pink);
    transform: scale(1.01) rotate(-0.5deg);
}

/* Status Badge (Refleksi) */
.status-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1rem !important;
    background: var(--sun) !important;
    padding: 0.9rem 1.6rem !important;
    border: 3px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 5px 5px 0 var(--ink) !important;
    transform: rotate(-1.5deg);
}

.status-emoji {
    font-size: 2.2rem;
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.2));
}

.status-text {
    font: 700 1.1rem var(--mono);
    color: var(--ink);
}

/* ==========================================================================
   TABLES & LISTS IMPROVISATION (Cardboard Scrapbook Tables)
   ========================================================================== */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border: 4px solid var(--ink);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 6px 6px 0 var(--ink);
    background: #ffffff;
}

th {
    background: var(--sun);
    color: var(--ink);
    font: 400 1.3rem var(--imp);
    letter-spacing: 0.04em;
    padding: 1rem;
    border-bottom: 3px solid var(--ink);
    border-right: 2px solid var(--ink);
    text-align: left;
}

th:last-child {
    border-right: none;
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    font-family: var(--mk);
}

td:last-child {
    border-right: none;
}

tr:nth-child(even) td {
    background: #fffcf0;
}

tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   MOBILE MENU & RESPONSIVENESS
   ========================================================================== */

.mobile-menu-btn {
    display: none;
    background: var(--sun);
    color: var(--ink);
    border: 3px solid var(--ink);
    border-radius: 8px;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.2rem 0.7rem;
    box-shadow: 3px 3px 0 var(--ink);
    margin-right: 1rem;
    transition: transform 0.15s ease;
}

.mobile-menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 900px) {
    .dashboard-container {
        position: static !important;
        z-index: auto !important;
    }

    .sidebar {
        position: fixed !important;
        left: -320px;
        top: 0;
        bottom: 0;
        width: min(290px, 85vw);
        max-width: 85vw;
        height: 100% !important;
        height: 100dvh !important;
        z-index: 2000 !important;
        transition: left 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
        box-shadow: 10px 0 0 var(--ink) !important;
        background: #f8efe0 !important;
        pointer-events: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.active {
        left: 0 !important;
    }

    .sidebar-overlay {
        display: block !important;
        pointer-events: none;
        z-index: 1999 !important;
    }

    .sidebar-overlay.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .top-header {
        padding: 1.1rem 1.4rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 1.35rem 1rem;
        gap: 1.4rem;
    }

    .flow-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.5rem 0;
    }

    .flow-card {
        flex: none;
        width: 100%;
        min-width: 0;
        padding: 1.5rem 1rem;
        transform: none !important;
        box-shadow: 5px 5px 0 var(--ink) !important;
    }

    .flow-arrow {
        transform: rotate(90deg);
        margin: 0.2rem auto;
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .top-header {
        padding: 0.85rem 0.9rem;
        gap: 0.6rem;
    }

    .mobile-menu-btn {
        font-size: 1.45rem;
        padding: 0.2rem 0.55rem;
        margin-right: 0.4rem;
    }

    .greeting {
        min-width: 0;
        flex: 1;
    }

    .greeting h1 {
        font-size: clamp(1.35rem, 5vw, 1.8rem);
        margin-bottom: 0.15rem;
        word-break: break-word;
    }

    .greeting p {
        font-size: 0.85rem;
    }

    .greeting .tape {
        font-size: 0.72rem;
        padding: 0.15rem 0.5rem;
    }

    .avatar {
        width: 48px;
        height: 48px;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink), 3px 3px 0 4px var(--ink);
    }

    .profile-dropdown {
        right: 0;
        min-width: 200px;
        max-width: calc(100vw - 20px);
    }

    .content-grid {
        padding: 1rem 0.75rem !important;
        gap: 1.2rem;
    }

    .interactive-card {
        height: auto !important;
        min-height: 210px !important;
        padding: 1.2rem 0.9rem !important;
        border-width: 3px !important;
        box-shadow: 4px 4px 0 var(--ink) !important;
        border-radius: 16px !important;
        transform: none !important;
    }

    .interactive-card:hover {
        transform: none !important;
    }

    .interactive-card h3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.8rem !important;
    }

    .dashboard-card, .glass-panel {
        padding: 1.35rem 0.9rem;
        border-width: 3.5px !important;
        box-shadow: 5px 5px 0 var(--ink) !important;
        transform: none !important;
    }

    .dashboard-card:nth-child(even), .dashboard-card:nth-child(odd) {
        transform: none !important;
    }

    .dashboard-card h2, .glass-panel h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
        margin-bottom: 0.75rem;
        transform: none !important;
    }

    .dashboard-card h3, .glass-panel h3 {
        font-size: clamp(1.15rem, 4vw, 1.4rem);
        margin-bottom: 0.6rem;
    }

    .tape-heading, h2.tape {
        font-size: 1.35rem !important;
        padding: 0.35rem 0.85rem !important;
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        box-shadow: 3px 3px 0 var(--ink) !important;
        transform: none !important;
    }

    .profile-card > div:first-child {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem !important;
        margin-bottom: 1.2rem !important;
    }

    .profile-avatar-large {
        width: 72px;
        height: 72px;
        margin: 0 auto;
    }

    .stat-pill {
        padding: 0.75rem 0.6rem;
        transform: none !important;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.78rem;
    }

    .module-strip {
        flex-direction: column;
        text-align: center;
        gap: 0.9rem;
        padding: 1.2rem 0.85rem !important;
        transform: none !important;
    }

    .module-strip:nth-child(even), .module-strip:nth-child(odd) {
        transform: none !important;
    }

    .module-strip img {
        width: 105px;
        margin: 0 auto;
        transform: none !important;
    }

    .progress-sticker {
        width: 68px;
        height: 68px;
        font-size: 1.35rem;
        box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink), 4px 4px 0 6px var(--ink);
        transform: none !important;
    }

    .teacher-note-card {
        padding: 1.2rem 0.85rem;
        border-width: 3px;
        box-shadow: 4px 4px 0 var(--ink);
        transform: none !important;
    }

    .note {
        padding: 1.4rem 0.9rem 1.1rem;
        box-shadow: 6px 6px 0 var(--ink);
        transform: none !important;
    }

    .note::before {
        width: 90px;
        height: 24px;
        margin-left: -45px;
        top: -12px;
    }

    .note::after {
        font-size: 0.88rem;
        padding: 0.1rem 0.55rem;
        right: 0;
        bottom: -10px;
        transform: none !important;
    }

    .quiz-option {
        padding: 0.8rem 0.85rem !important;
        font-size: 0.95rem !important;
        transform: none !important;
        border-width: 2.5px !important;
        box-shadow: 3px 3px 0 var(--ink) !important;
    }

    .quiz-option:nth-child(even), .quiz-option:nth-child(odd) {
        transform: none !important;
    }

    .quiz-option:hover {
        transform: none !important;
    }

    .quiz-option:has(input:checked) {
        transform: none !important;
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink), 3px 3px 0 4px var(--ink) !important;
    }

    .btn, .btn-small, .btn-start {
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        text-align: center;
        box-sizing: border-box;
    }

    .btn-start {
        padding: 0.8rem 1.4rem;
        font-size: 1.15rem;
    }

    .btn-small {
        padding: 0.5rem 0.95rem;
        font-size: 0.9rem;
    }

    .modal-card, .settings-card {
        padding: 1.4rem 0.9rem !important;
        border-width: 3.5px !important;
        box-shadow: 6px 6px 0 var(--ink) !important;
        transform: none !important;
        width: 95% !important;
        max-width: 95% !important;
        box-sizing: border-box;
    }

    .modal-title {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 400px) {
    .top-header {
        padding: 0.75rem 0.65rem;
        gap: 0.4rem;
    }

    .mobile-menu-btn {
        font-size: 1.35rem;
        padding: 0.15rem 0.45rem;
        margin-right: 0.3rem;
    }

    .avatar {
        width: 42px;
        height: 42px;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px var(--ink), 2px 2px 0 3px var(--ink);
    }

    .greeting h1 {
        font-size: 1.3rem;
    }

    .greeting p {
        font-size: 0.78rem;
    }

    .greeting .tape {
        font-size: 0.68rem;
        padding: 0.12rem 0.4rem;
    }

    .content-grid {
        padding: 0.75rem 0.5rem !important;
        gap: 1rem;
    }

    .dashboard-card, .glass-panel {
        padding: 1.15rem 0.65rem;
        box-shadow: 3.5px 3.5px 0 var(--ink) !important;
        border-width: 3px !important;
    }

    .tape-heading, h2.tape {
        font-size: 1.15rem !important;
        padding: 0.28rem 0.6rem !important;
    }

    .flow-card {
        padding: 1.2rem 0.75rem;
    }

    .flow-card .step-num {
        font-size: 1.9rem;
    }

    .flow-card h4 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   CARDBOARD SCRAPBOOK CALENDAR (Jurnal Harian)
   ========================================================================== */

.calendar-board {
    background: var(--paper-warm) !important;
    border: 5px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 10px 10px 0 var(--ink) !important;
    padding: 2.5rem 2rem !important;
    position: relative;
    transform: rotate(-0.5deg);
}

.calendar-board::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 20%;
    width: 22px;
    height: 38px;
    background: #e2e8f0;
    border: 4px solid var(--ink);
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
    z-index: 10;
}

.calendar-board::after {
    content: '';
    position: absolute;
    top: -20px;
    right: 20%;
    width: 22px;
    height: 38px;
    background: #e2e8f0;
    border: 4px solid var(--ink);
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
    z-index: 10;
}

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 4px dashed var(--ink);
}

.calendar-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-title-main {
    font: 400 clamp(2rem, 4.5vw, 3rem)/1 var(--imp);
    color: var(--ink);
    text-shadow: 3px 3px 0 var(--sun);
    letter-spacing: 0.03em;
    margin: 0;
    transform: rotate(-1.5deg);
}

.btn-cal-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: var(--paper);
    color: var(--ink);
    font: 700 1.05rem var(--mk);
    border: 3px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    box-shadow: 4px 4px 0 var(--ink);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.btn-cal-nav:hover {
    background: var(--lime);
    transform: scale(1.05) rotate(1deg);
    box-shadow: 6px 6px 0 var(--ink);
}

.btn-cal-nav:active {
    transform: translate(3px, 3px) rotate(-1deg);
    box-shadow: 1px 1px 0 var(--ink);
}

.cal-legend-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    padding: 0.7rem 1.2rem;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--ink);
    transform: rotate(0.6deg);
}

.legend-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font: 700 0.92rem var(--mono);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 2px solid var(--ink);
}

.legend-tag.senang { background: var(--sun); }
.legend-tag.biasa { background: var(--cy); }
.legend-tag.sedih { background: var(--paper-pink); }
.legend-tag.marah { background: var(--orange); color: #fff; }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.cal-weekday-tag {
    font: 400 1.2rem/1 var(--imp);
    letter-spacing: 0.04em;
    color: var(--ink);
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 8px;
    padding: 0.5rem 0.2rem;
    box-shadow: 3px 3px 0 var(--ink);
    text-transform: uppercase;
    transform: rotate(-1deg);
}

.cal-weekday-tag:nth-child(even) {
    transform: rotate(1deg);
}

.cal-weekday-tag.sunday {
    background: var(--pink);
    color: #fff;
}

.cal-weekday-tag.friday {
    background: var(--lime);
}

.calendar-grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    text-align: center;
}

.cal-cell {
    min-height: 95px;
    padding: 8px 6px;
    background: #ffffff;
    border: 3px solid var(--ink);
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    box-shadow: 4px 4px 0 var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.18s ease, background 0.18s ease;
    user-select: none;
}

.cal-cell:nth-child(even) {
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px;
}

.cal-cell.empty-pad {
    background: transparent;
    border: 2px dashed rgba(0, 0, 0, 0.2);
    box-shadow: none;
    pointer-events: none;
    min-height: 95px;
}

.cal-cell.no-entry {
    background: #faf7ef;
    color: #888;
    border-color: #666;
    box-shadow: 2px 2px 0 var(--ink);
}

.cal-cell.no-entry:hover {
    transform: translateY(-2px);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

.cal-cell.has-entry {
    background: #fffde6;
    cursor: pointer;
}

.cal-cell.has-entry:hover {
    transform: scale(1.08) rotate(-2deg);
    background: var(--sun) !important;
    box-shadow: 7px 7px 0 var(--ink);
    z-index: 10;
}

.cal-cell.has-entry:active {
    transform: translate(3px, 3px) rotate(0deg);
    box-shadow: 2px 2px 0 var(--ink);
}

.cal-cell.is-today {
    border-width: 4px !important;
    border-color: var(--pink) !important;
    background: #fff8fc !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pink), 6px 6px 0 5px var(--ink) !important;
}

.cal-cell.is-today .cal-num {
    color: var(--pink);
    font-weight: 900;
}

.today-mini-stamp {
    position: absolute;
    top: -8px;
    right: -6px;
    background: var(--pink);
    color: #fff;
    font: 700 0.65rem var(--mono);
    padding: 1px 4px;
    border: 1.5px solid var(--ink);
    border-radius: 4px;
    box-shadow: 1.5px 1.5px 0 var(--ink);
    transform: rotate(8deg);
    pointer-events: none;
}

.cal-num {
    font: 700 1.15rem var(--mono);
    color: var(--ink);
    text-align: left;
    padding-left: 4px;
    line-height: 1;
}

.cal-emoji-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.4rem;
    margin: 4px 0;
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.2));
    transition: transform 0.2s ease;
}

.cal-cell.has-entry:hover .cal-emoji-wrap {
    transform: scale(1.2) rotate(6deg);
}

.cal-mood-text {
    font: 700 0.72rem var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding: 1px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jurnal-details-card {
    position: relative;
    background: var(--paper) !important;
    border: 5px solid var(--ink) !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
    box-shadow: 10px 10px 0 var(--ink) !important;
    padding: 2.5rem 2rem !important;
    margin-top: 2.5rem;
    animation: openNote 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transform: rotate(-1deg);
}

@keyframes openNote {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96) rotate(1deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(-1deg);
    }
}

.jurnal-details-card::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 40px;
    width: 140px;
    height: 34px;
    background: rgba(255, 229, 0, 0.92);
    border: 2px dashed rgba(0, 0, 0, 0.35);
    transform: rotate(-3deg);
    z-index: 2;
}

@media (max-width: 768px) {
    .calendar-board {
        padding: 1.4rem 0.65rem 1rem !important;
        border-width: 3.5px !important;
        box-shadow: 5px 5px 0 var(--ink) !important;
        transform: none !important;
    }

    .calendar-board::before, .calendar-board::after {
        width: 16px;
        height: 28px;
        top: -14px;
        border-width: 3px;
    }

    .calendar-title-wrapper {
        flex-direction: column;
        gap: 0.6rem;
        align-items: center;
        text-align: center;
    }

    .calendar-title-main {
        font-size: 1.55rem;
        transform: none !important;
    }

    .btn-cal-nav {
        font-size: 0.88rem;
        padding: 0.35rem 0.8rem;
    }

    .cal-legend-bar {
        gap: 0.45rem;
        padding: 0.45rem 0.6rem;
        font-size: 0.78rem;
        transform: none !important;
    }

    .legend-tag {
        font-size: 0.75rem;
        padding: 0.15rem 0.45rem;
    }

    .cal-weekdays {
        gap: 5px;
        margin-bottom: 6px;
    }

    .cal-weekday-tag {
        font-size: 0.78rem;
        padding: 0.25rem 0;
        border-width: 2px;
        box-shadow: 2px 2px 0 var(--ink);
        transform: none !important;
    }

    .calendar-grid-container {
        gap: 5px;
    }

    .cal-cell {
        min-height: 58px;
        padding: 4px 2px;
        border-width: 2px;
        box-shadow: 2px 2px 0 var(--ink);
        border-radius: 8px !important;
        transform: none !important;
    }

    .cal-cell:nth-child(even), .cal-cell:nth-child(odd) {
        transform: none !important;
        border-radius: 8px !important;
    }

    .cal-cell:hover {
        transform: none !important;
    }

    .cal-num {
        font-size: 0.82rem;
    }

    .cal-emoji-wrap {
        font-size: 1.3rem;
    }

    .cal-mood-text {
        display: none;
    }

    .jurnal-details-card {
        padding: 1.4rem 0.9rem !important;
        margin-top: 1.5rem;
        transform: none !important;
        box-shadow: 5px 5px 0 var(--ink) !important;
        border-width: 3.5px !important;
    }

    .jurnal-details-card::before {
        width: 100px;
        height: 26px;
        left: 20px;
        top: -12px;
    }
}

@media (max-width: 400px) {
    .calendar-board {
        padding: 1rem 0.35rem 0.8rem !important;
        border-width: 3px !important;
        box-shadow: 4px 4px 0 var(--ink) !important;
    }

    .calendar-board::before, .calendar-board::after {
        display: none;
    }

    .calendar-title-main {
        font-size: 1.25rem;
    }

    .btn-cal-nav {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-width: 2px;
    }

    .cal-legend-bar {
        gap: 0.3rem;
        padding: 0.3rem 0.4rem;
    }

    .legend-tag {
        font-size: 0.68rem;
        padding: 0.1rem 0.3rem;
        border-width: 1.5px;
    }

    .cal-weekdays {
        gap: 3px;
        margin-bottom: 4px;
    }

    .cal-weekday-tag {
        font-size: 0.66rem;
        padding: 0.18rem 0;
        border-width: 1.5px;
        box-shadow: 1px 1px 0 var(--ink);
    }

    .calendar-grid-container {
        gap: 3px;
    }

    .cal-cell {
        min-height: 48px;
        padding: 2px 1px;
        border-width: 1.5px;
        box-shadow: 1.5px 1.5px 0 var(--ink);
        border-radius: 6px !important;
    }

    .cal-cell.empty-pad {
        min-height: 48px;
    }

    .cal-num {
        font-size: 0.72rem;
    }

    .cal-emoji-wrap {
        font-size: 1.05rem;
    }

    .jurnal-details-card {
        padding: 1.15rem 0.7rem !important;
        box-shadow: 4px 4px 0 var(--ink) !important;
        border-width: 3px !important;
    }
}

