/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary: #10B981;
    /* Emerald 500 */
    --bg-body: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-primary: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    /* Standardized Border Radius Tokens (Crisp, Modern & Unified) */
    --radius-sm: 4px;
    /* Micro elements: badge status mikro, icon box mini, check-square */
    --radius: 6px;
    /* Komponen interaktif utama: tombol, tab switch, input field, menu item, kanban card */
    --radius-md: 8px;
    /* Kontainer sedang: card, panel, dropdown menu, modal dialog */
    --radius-lg: 12px;
    /* Kontainer besar khusus */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
}

a, button, input, select, textarea, [role="button"], .btn, .nav-link, .chat-list-item, .tool-btn {
    -webkit-tap-highlight-color: transparent !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* PDF.js Text Layer - Keep text transparent */
.textLayer,
.textLayer span,
.textLayer br {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Utilities */
/* ==========================================================================
   Standardized Unified Header Widget
   Uniform height, typography, and vertical centering across all menus
   ========================================================================== */
div.card.header-widget,
.main-content .header-widget,
.header-widget {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md, 8px) !important;
    margin-bottom: 0.5rem !important;
    box-shadow: var(--shadow-sm) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.admin-app-layout .header-widget {
    margin: 1rem 1rem 0.5rem 1rem !important;
    width: calc(100% - 2rem) !important;
}

/* Desktop: Exact uniform 52px height for all headers (with or without tab switch) */
@media screen and (min-width: 641px) {

    div.card.header-widget,
    .main-content .header-widget,
    .header-widget {
        height: 52px !important;
        min-height: 52px !important;
        padding: 0 1rem !important;
    }

    .header-widget .header-content,
    .header-widget .header-widget-content {
        height: 100% !important;
    }
}

/* Mobile: Flexible height to gracefully support 2-row layout when tab switch wraps */
@media screen and (max-width: 640px) {

    div.card.header-widget,
    .main-content .header-widget,
    .header-widget {
        height: auto !important;
        min-height: 48px !important;
        padding: 0.55rem 0.85rem !important;
    }
}

.header-widget .header-content,
.header-widget .header-widget-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.header-widget h2,
.header-widget h3,
.header-widget-title {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--text-main, #111827) !important;
    line-height: 1.2 !important;
}

.header-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0f172a url('../img/domaku-login-q82.webp') no-repeat center center / cover;
    background-attachment: fixed;
    position: relative;
    padding: 1.5rem 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.25rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

/* Dashboard Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #EEF2FF;
    color: var(--primary);
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 1rem;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    .main-content {
        padding: 0.75rem;
    }

    .card {
        padding: 1rem !important;
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

/* Chat / Bimbingan */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message.self {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-bubble {
    background-color: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.message.self .message-bubble {
    background-color: var(--primary);
    color: white;
    border: none;
}

.message-meta {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    text-decoration: none;
}

.message.self .file-attachment {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-pending {
    background: #FEF3C7;
    color: #D97706;
}

.tag-approved {
    background: #D1FAE5;
    color: #059669;
}

.tag-rejected {
    background: #FEE2E2;
    color: #DC2626;
}

.tag-completed {
    background: #E0E7FF;
    color: #4338CA;
}

.collapse-section {
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out;
    max-height: 2000px;
    /* Arbitrary large height */
    opacity: 1;
}

.collapse-section.collapsed {
    max-height: 0;
    opacity: 0;
}

@media screen and (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Logo Animations */
.logo-animate-spin {
    animation: spin 10s linear infinite;
}

.logo-animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.logo-animate-bounce {
    animation: bounce 2s infinite;
}

.logo-animate-fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.logo-animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-animate-soft-shake {
    animation: softShake 5s ease-in-out infinite;
}

@keyframes softShake {

    0%,
    50%,
    100% {
        transform: rotate(0deg);
    }

    /* Istirahat (Delay) */
    5% {
        transform: rotate(5deg);
    }

    /* Kanan */
    10% {
        transform: rotate(-5deg);
    }

    /* Kiri */
    15% {
        transform: rotate(5deg);
    }

    /* Kanan */
    20% {
        transform: rotate(-5deg);
    }

    /* Kiri */
    25% {
        transform: rotate(0deg);
    }

    /* Kembali Diam */
}


/* Dual Logo Reveal Animation */
.logo-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Mask the text initially */
    padding-right: 10px;
    /* Space for text to slide into */
    margin-bottom: 2rem;
}

.logo-part-icon {
    position: relative;
    z-index: 10;
    /* Icon stays on top */
    transition: transform 0.5s ease;
}

.logo-part-text {
    position: relative;
    z-index: 5;
    /* Text is behind */
    margin-left: 15px;
    /* Spacing */
    opacity: 0;
    transform: translateX(-100%);
    /* Start hidden behind icon */
    animation: slideReveal 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
    /* Wait for icon to settle */
}

@keyframes slideReveal {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Modern Logo Animations */
.logo-animate-flip {
    animation: flip3d 3s infinite;
    backface-visibility: visible;
}

.logo-animate-elastic {
    animation: elasticScale 2s infinite ease-in-out;
}

.logo-animate-shimmer {
    position: relative;
    overflow: hidden;
}

.logo-animate-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

.logo-animate-wobble {
    animation: wobble 2s infinite;
}

.logo-animate-heartbeat {
    animation: heartbeat 1.5s infinite;
}

@keyframes flip3d {
    0% {
        transform: perspective(400px) rotateY(0);
    }

    40% {
        transform: perspective(400px) rotateY(180deg);
    }

    50% {
        transform: perspective(400px) rotateY(180deg);
    }

    90% {
        transform: perspective(400px) rotateY(0);
    }

    100% {
        transform: perspective(400px) rotateY(0);
    }
}

@keyframes elasticScale {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    100% {
        left: 200%;
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: translateX(0%);
        transform-origin: 50% 50%;
    }

    15% {
        transform: translateX(-6px) rotate(-6deg);
    }

    30% {
        transform: translateX(3px) rotate(6deg);
    }

    45% {
        transform: translateX(-3px) rotate(-3.6deg);
    }

    60% {
        transform: translateX(2px) rotate(2.4deg);
    }

    75% {
        transform: translateX(-1px) rotate(-1.2deg);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

/* ==========================================================================
   FEATURE BADGES (PREMIUM & BETA) - NO EMOJI, MODERN PILL BADGES
   ========================================================================== */
.badge-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 9999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
    user-select: none;
    transition: all 0.15s ease;
}

.badge-feature svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* Premium Badge: Sophisticated violet/indigo luxury */
.badge-feature.badge-premium {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
    border: 1px solid #c4b5fd;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.08);
}

.badge-feature.badge-premium:hover {
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    border-color: #a78bfa;
}

/* Beta Badge: Vibrant cyan/sky modern tech badge */
.badge-feature.badge-beta {
    background: linear-gradient(135deg, #ecfeff, #e0f2fe);
    color: #0369a1;
    border: 1px solid #7dd3fc;
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.08);
}

.badge-feature.badge-beta:hover {
    background: linear-gradient(135deg, #e0f2fe, #ecfeff);
    border-color: #38bdf8;
}

/* Badge Inverted: for active dark menus or highlighted backgrounds */
.badge-feature.badge-invert {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

/* Desktop Badge: Clean modern slate/gray badge indicating desktop requirement */
.badge-feature.badge-desktop {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #334155;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(100, 116, 139, 0.08);
}

.badge-feature.badge-desktop:hover {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    border-color: #94a3b8;
}

/* Responsive Desktop Only Fallback */
.desktop-only-fallback {
    display: none;
}

@media screen and (max-width: 600px) {
    .desktop-only-page .desktop-restricted-content {
        display: none !important;
    }

    .desktop-only-page .desktop-only-fallback {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 70px);
        box-sizing: border-box;
    }
}

/* ==========================================================================
   DESKTOP ONLY NOTICE CARD - MINIMALIST & FUNCTION-FIRST (RULE 9 & 10)
   ========================================================================== */
.desktop-notice-card {
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-md, 8px);
    max-width: 380px;
    width: 100%;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
}

.desktop-notice-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius, 6px);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--primary, #2563eb);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.desktop-notice-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.desktop-notice-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.desktop-notice-desc {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
}

.desktop-notice-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.desktop-notice-actions .btn,
.btn-desktop-primary,
.btn-desktop-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius, 6px);
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-desktop-primary {
    background: var(--primary, #2563eb);
    color: #ffffff;
    border: 1px solid var(--primary, #2563eb);
}

.btn-desktop-primary:hover {
    background: var(--primary-hover, #1d4ed8);
    border-color: var(--primary-hover, #1d4ed8);
    color: #ffffff;
}

.btn-desktop-secondary {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-desktop-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* ==========================================================================
   DOMAKU Minimalist Notification System (Banner & Toasts)
   Simple, Refined, Zero-Slop Design - Strictly No Emojis
/* PWA In-App Install Floating Banner (White Theme, Bottom-Right on Desktop) */
#domaku-pwa-install-banner {
    position: fixed !important;
    bottom: 16px !important;
    left: 16px !important;
    right: 16px !important;
    margin: 0 auto !important;
    width: calc(100% - 32px) !important;
    max-width: 420px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.08) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
    color: #0f172a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Outfit", "Segoe UI", Roboto, sans-serif !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease !important;
    transform: translateY(120%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#domaku-pwa-install-banner.domaku-pwa-visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media screen and (min-width: 768px) {
    #domaku-pwa-install-banner {
        left: auto !important;
        right: 24px !important;
        bottom: 24px !important;
        margin: 0 !important;
        width: 390px !important;
        transform: translateY(120%) !important;
    }

    #domaku-pwa-install-banner.domaku-pwa-visible {
        transform: translateY(0) !important;
    }
}

/* 1. Minimal Soft Permission Banner */
.domaku-notif-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    top: auto;
    left: auto;
    transform: translateY(20px);
    z-index: 99999;
    max-width: 480px;
    width: calc(100% - 32px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.domaku-notif-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.domaku-notif-banner-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    border-radius: 8px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-sizing: border-box;
    width: 100%;
}

.domaku-notif-banner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.domaku-notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
}

.domaku-notif-banner-text {
    flex: 1;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 500;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.domaku-notif-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.domaku-notif-btn-later {
    background: transparent;
    border: none;
    color: #64748b;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.domaku-notif-btn-later:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.domaku-notif-btn-enable {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.domaku-notif-btn-enable:hover {
    background: #1e293b;
}

.domaku-notif-btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.domaku-notif-btn-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* 2. Minimalist Floating Toast Cards */
.domaku-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    /* Di atas viewer PDF #editorModal (z-index 999999) agar toast tetap terlihat */
    z-index: 1000002;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 330px;
    width: calc(100% - 32px);
}

.domaku-toast-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    padding: 9px 12px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    cursor: pointer;
}

.domaku-toast-card:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.domaku-toast-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.domaku-toast-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 5px;
    flex-shrink: 0;
}

.domaku-toast-content {
    flex: 1;
    min-width: 0;
}

.domaku-toast-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.domaku-toast-text {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.domaku-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: -1px;
    margin-right: -2px;
    transition: color 0.15s, background 0.15s;
}

.domaku-toast-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Mobile Responsive */
@media screen and (max-width: 640px) {
    .domaku-notif-banner {
        top: auto;
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: translateY(20px);
        width: calc(100% - 32px);
        max-width: 440px;
        margin: 0 auto;
    }

    .domaku-notif-banner.visible {
        transform: translateY(0);
    }

    .domaku-notif-banner-bar {
        padding: 9px 12px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        row-gap: 8px;
        border-radius: 10px;
    }

    .domaku-notif-banner-info {
        order: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .domaku-notif-banner-text {
        font-size: 0.76rem;
        white-space: normal;
        line-height: 1.35;
        overflow: visible;
        text-overflow: clip;
    }

    .domaku-notif-btn-close {
        order: 2;
        padding: 4px;
        margin-left: 6px;
    }

    .domaku-notif-banner-actions {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding-top: 2px;
    }

    .domaku-notif-btn-later {
        flex: 1;
        max-width: 110px;
        text-align: center;
        padding: 6px 10px;
        font-size: 0.76rem;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .domaku-notif-btn-enable {
        flex: 1;
        max-width: 120px;
        text-align: center;
        padding: 6px 12px;
        font-size: 0.76rem;
    }

    .domaku-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 100%;
    }
}

/* ==========================================================================
   Segmented Tab Switch (.capsule-switch / .tab-switch)
   Minimalist, tight, and compact segmented switch with unified border-radius
   ========================================================================== */
.capsule-switch,
.tab-switch {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius, 6px);
    padding: 3px;
    gap: 3px;
    box-sizing: border-box;
    max-width: 100%;
}

.capsule-switch-item,
.tab-switch-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.32rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.25;
    border-radius: calc(var(--radius, 6px) - 2px);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748b;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
}

.capsule-switch-item:hover,
.tab-switch-item:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.03);
}

.capsule-switch-item.active,
.tab-switch-item.active {
    background: #ffffff !important;
    color: var(--primary, #2563eb) !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: default;
}

.capsule-switch-item.active:hover,
.tab-switch-item.active:hover {
    background: #ffffff !important;
    color: var(--primary, #2563eb) !important;
}

/* Micro badges inside tab switch */
.capsule-switch-item .badge-feature,
.tab-switch-item .badge-feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm, 4px);
    letter-spacing: 0.02em;
    vertical-align: middle;
    flex-shrink: 0;
}

.capsule-switch-item.active .badge-feature,
.tab-switch-item.active .badge-feature {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary, #2563eb);
    border: none;
}

.capsule-switch-item:not(.active) .badge-feature,
.tab-switch-item:not(.active) .badge-feature {
    background: #e2e8f0;
    color: #475569;
    border: none;
}

.capsule-switch-item .badge-feature.badge-beta,
.tab-switch-item .badge-feature.badge-beta {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
}

.capsule-switch-item .badge-feature.badge-premium,
.tab-switch-item .badge-feature.badge-premium {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

/* ==========================================================================
   Header Action Buttons & Auto-ACC (.btn-auto-acc)
   ========================================================================== */
.btn-auto-acc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.76rem;
    border-radius: var(--radius, 6px);
    font-weight: 500;
    height: 32px;
    white-space: nowrap;
    border: 1px solid var(--border, #e2e8f0);
    background: #ffffff;
    color: var(--text-main, #334155);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    box-sizing: border-box;
}

.btn-auto-acc:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-auto-acc.is-active {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.btn-auto-acc.is-active:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.auto-acc-icon-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auto-acc-dot {
    display: none;
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    border: 1.5px solid #ffffff;
}

.auto-acc-dot.is-active {
    background: #10b981;
    box-shadow: 0 0 0 1px #a7f3d0;
}

.btn-auto-acc .badge-auto-status {
    font-size: 0.65rem;
    padding: 1px 5px;
    font-weight: 600;
    line-height: 1.1;
    border-radius: var(--radius-sm, 4px);
}

.btn-auto-acc .badge-auto-status.is-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.btn-auto-acc .badge-auto-status.is-inactive {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Responsive Header & Segmented Tab Switch for Mobile (<= 640px)
   ========================================================================== */
@media screen and (max-width: 640px) {
    .header-widget {
        min-height: 48px !important;
        padding: 0.55rem 0.85rem !important;
    }

    .header-widget .header-content {
        flex-wrap: wrap !important;
        gap: 0.4rem 0.5rem !important;
        align-items: center !important;
    }

    .header-title-group {
        display: contents !important;
    }

    .header-title-group>h3,
    .header-content>h3 {
        order: 1 !important;
        font-size: 1.02rem !important;
        line-height: 1.25 !important;
        margin: 0 !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header-actions {
        order: 2 !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .btn-auto-acc {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 0 !important;
        flex-shrink: 0 !important;
    }

    .btn-auto-acc .auto-acc-text,
    .btn-auto-acc .badge-auto-status {
        display: none !important;
    }

    .btn-auto-acc .auto-acc-dot {
        display: block !important;
    }

    .capsule-switch,
    .tab-switch {
        order: 3 !important;
        width: 100% !important;
        display: flex !important;
        margin-top: 0.25rem !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }

    .capsule-switch::-webkit-scrollbar,
    .tab-switch::-webkit-scrollbar {
        display: none !important;
    }

    .capsule-switch-item,
    .tab-switch-item {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 0.32rem 0.35rem !important;
        font-size: 0.76rem !important;
        gap: 4px !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .capsule-switch-item .badge-feature,
    .tab-switch-item .badge-feature {
        font-size: 0.55rem !important;
        padding: 1px 4px !important;
    }

    /* Hide non-critical badges in mobile view to prevent overflowing/squishing */
    .capsule-switch-item .badge-premium,
    .tab-switch-item .badge-premium {
        display: none !important;
    }
}

/* Adaptive Label Switching for Extreme Small Screen (<= 380px) */
.tab-label-short {
    display: none;
}

@media screen and (max-width: 380px) {
    .tab-label-full {
        display: none !important;
    }

    .tab-label-short {
        display: inline !important;
    }
}

/* 2-Column Smart Table Utility for Extreme Small Screen (<= 420px) */
.mobile-sub-meta {
    display: none;
}

@media screen and (max-width: 420px) {
    .mobile-sub-meta {
        display: block !important;
    }
}

/* ==========================================================================
   Minimalist & Function-First Modal Dialog Standard (Rule 10)
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.modal-compact {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border, #e2e8f0);
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.modal-compact-header {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.modal-compact-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    line-height: 1.3;
}

.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius, 6px);
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.15s ease;
    padding: 0;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: var(--text-main, #1e293b);
}

.modal-compact-body {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 6px);
    background: #ffffff;
    transition: border-color 0.15s ease;
}

.modal-setting-row:hover {
    border-color: #cbd5e1;
}

.modal-setting-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    margin: 0;
}

.modal-compact-footer {
    padding: 0.75rem 1.15rem;
    border-top: 1px solid var(--border, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: #f8fafc;
}

/* ==========================================================================
   Supervision Audio Requirement Pill (Student Upload - Minimalist)
   ========================================================================== */
.audio-req-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-sm, 4px);
    white-space: nowrap;
    user-select: none;
    transition: all 0.18s ease;
    box-sizing: border-box;
}

.audio-req-pill.req-empty {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.audio-req-pill.req-satisfied {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.28) !important;
}

/* ==========================================================================
   DOMAKU PWA Seamless Top Progress Loader & Touch Feedback
   Ultra-thin, non-blocking visual feedback for mobile & tablet navigation
   ========================================================================== */
#domaku-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    padding-top: env(safe-area-inset-top, 0);
}

#domaku-top-loader.active {
    opacity: 1;
}

.domaku-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4F46E5 0%, #06B6D4 60%, #10B981 100%);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.6), 0 0 3px rgba(16, 185, 129, 0.4);
    border-radius: 0 2px 2px 0;
    transition: width 0.2s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.18s ease;
    position: relative;
}

.domaku-loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75));
    border-radius: 50%;
    opacity: 0.8;
}

/* Instant Touch / Tap Feedback on Mobile & Tablet */
.touch-feedback,
.domaku-tap-active {
    transform: scale(0.985) !important;
    opacity: 0.86 !important;
    transition: transform 0.08s ease, opacity 0.08s ease !important;
}

/* Form Submit Button Micro-Processing State */
.domaku-btn-processing {
    pointer-events: none !important;
    opacity: 0.82 !important;
    cursor: wait !important;
    filter: saturate(0.9);
    transition: opacity 0.2s ease;
}

/* Anti-White Flash / Soft Page Entry Transition */
@keyframes domakuPageFadeIn {
    0% {
        opacity: 0.94;
    }
    100% {
        opacity: 1;
    }
}

body.domaku-page-ready {
    animation: domakuPageFadeIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}