:root {
    --primary: #E53935;
    --primary-dark: #C62828;
    --primary-light: #FFEBEE;
    --bg-color: #F5F7FA;
    --surface: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --success: #10B981;
    --danger: #EF4444;
    --blue: #3B82F6;
    --blue-light: #DBEAFE;
    --purple: #8B5CF6;
    --purple-light: #EDE9FE;
    --nav-height: 64px;
    --topbar-height: 56px;
    --font-family: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-color: #111827;
    --surface: #1F2937;
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --border: #374151;
    --primary-light: rgba(229, 57, 53, 0.2);
    --blue-light: rgba(59, 130, 246, 0.2);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography & Utilities */
h1, h2, h3, h4 { font-weight: 600; color: var(--text-main); margin-bottom: 0.5rem; }
a { text-decoration: none; color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-blue { color: var(--blue) !important; }
.text-white { color: #fff !important; }
.bg-red-light { background-color: var(--primary-light) !important; }
.bg-blue-light { background-color: var(--blue-light) !important; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.p-3 { padding: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }

/* Views & Login Layout */
.view {
    display: none;
}
.view.active {
    display: block;
}

.login-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.25rem 0.5rem;
        max-width: 100%;
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-logo picture {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 275px;
}

.login-logo-img {
    max-width: 275px;
    width: 100%;
    height: auto;
    aspect-ratio: 1024 / 561;
    object-fit: contain;
    border-radius: 18px;
    background: #ffffff;
    padding: 10px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0 auto;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.12), 0 3px 8px rgba(0, 0, 0, 0.04);
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.6rem;
    border-radius: 20px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.06);
    background: #ffffff;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.6rem 1.15rem;
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    }
}

.login-info {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.superadmin-only, .admin-only, .anggota-only, .non-superadmin {
    display: none;
}
.tab-content {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}
.tab-content.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms & Buttons - Mobile App Touch Friendly */
.form-group {
    margin-bottom: 0.75rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 11px;
    padding-right: 28px;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    gap: 6px;
    min-height: 38px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.btn:active {
    transform: scale(0.98);
}
.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
    min-height: 30px;
    border-radius: 6px;
    gap: 4px;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-success {
    background-color: #16a34a;
    color: #ffffff !important;
    border: 1px solid #16a34a;
}
.btn-success:hover {
    background-color: #15803d;
    color: #ffffff !important;
}
.btn-success i, .btn-success span {
    color: #ffffff !important;
}
.btn-warning {
    background-color: #ea580c;
    color: #ffffff !important;
    border: 1px solid #ea580c;
}
.btn-warning:hover {
    background-color: #c2410c;
    color: #ffffff !important;
}
.btn-warning i, .btn-warning span {
    color: #ffffff !important;
}
.btn-danger {
    background-color: #dc2626;
    color: #ffffff !important;
    border: 1px solid #dc2626;
}
.btn-danger:hover {
    background-color: #b91c1c;
    color: #ffffff !important;
}
.btn-danger i, .btn-danger span {
    color: #ffffff !important;
}
.btn-xs {
    padding: 3px 8px;
    font-size: 0.72rem;
    min-height: 24px;
    border-radius: 6px;
    gap: 3px;
}
.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.btn-text {
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.82rem;
    color: var(--primary);
    padding: 0;
    min-height: auto;
}
.btn-text:hover {
    opacity: 0.8;
}
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-outline-danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

/* Responsive Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}
th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.4px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
[data-theme="dark"] th {
    background-color: #1e293b;
    color: #94a3b8;
}
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}

/* App Layout - Mobile Web App Standard */
#app-container, #view-superadmin {
    padding-top: var(--topbar-height);
    padding-bottom: calc(var(--nav-height) + 16px);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    background-color: var(--bg-color);
    min-height: 100vh;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    #app-container, #view-superadmin {
        max-width: 520px;
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.07);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
    .topbar, .bottom-nav {
        left: auto !important;
        right: auto !important;
        width: 520px !important;
        margin: 0 auto;
    }
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}

[data-theme="dark"] .topbar {
    background-color: rgba(31, 41, 55, 0.94);
}

.topbar-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile-first Content Area: Compact 8px edge margins */
.content-area {
    padding: 8px 8px 80px 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Cards - Edge-to-edge compact mobile feel */
.card {
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}
.welcome-card {
    padding: 12px 14px;
    margin-bottom: 8px;
}
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.user-info h2 { 
    margin: 0; 
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background-color: var(--border);
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
}
.badge-superadmin {
    background-color: var(--purple-light);
    color: var(--purple);
}
.badge-admin {
    background-color: var(--primary-light);
    color: var(--primary);
}
.badge-anggota {
    background-color: var(--blue-light);
    color: var(--blue);
}
.badge-wira {
    background-color: var(--primary-light);
    color: var(--primary);
}
.badge-madya {
    background-color: var(--blue-light);
    color: var(--blue);
}
.badge-mula {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.badge-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.date-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Stats Grid & Containers - Mobile Compact */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.stats-grid-member {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

/* Admin Dashboard Stats Layout (2 Top Highlights + 3 Compact Metrics) */
.admin-stats-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.admin-stats-row-top {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

.admin-stats-row-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

/* Stat Cards */
.stat-card {
    background-color: var(--surface);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.stat-card-featured {
    padding: 11px 12px;
    background: var(--surface);
}

.stat-card-compact {
    padding: 9px 8px;
}

.stat-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-info-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.stat-label {
    display: block;
    font-size: 0.69rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.stat-value {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-rating-box {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.stat-rating-box .stat-value {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-rating-box .star-rating-wrapper {
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #ca8a04;
    white-space: nowrap;
    overflow: hidden;
}

/* Mobile Responsiveness for Stats */
@media (max-width: 540px) {
    .stats-grid-member {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .stats-grid-member .stat-card {
        padding: 8px 4px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    .stats-grid-member .stat-card .stat-icon-wrapper {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .stats-grid-member .stat-card .stat-info-wrapper {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .stats-grid-member .stat-card .stat-label {
        font-size: 0.65rem;
        white-space: normal;
        line-height: 1.15;
    }
    .stats-grid-member .stat-card .stat-value {
        font-size: 0.95rem;
    }
    .stats-grid-member .stat-card .stat-rating-box {
        justify-content: center;
    }
    .stats-grid-member .stat-card .stat-rating-box .star-rating-wrapper {
        display: none;
    }

    .admin-stats-row-top {
        gap: 6px;
    }
    .admin-stats-row-bottom {
        gap: 6px;
    }
    .admin-stats-row-top .stat-card {
        padding: 8px 10px;
        gap: 6px;
    }
    .admin-stats-row-top .stat-card .stat-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
    }
    .admin-stats-row-top .stat-card .stat-value {
        font-size: 1rem;
    }
    .admin-stats-row-top .stat-card .stat-rating-box .star-rating-wrapper {
        font-size: 0.65rem;
        gap: 0.5px;
    }

    .stat-card-compact {
        padding: 8px 4px;
        flex-direction: column;
        text-align: center;
        gap: 3px;
        justify-content: center;
    }
    .stat-card-compact .stat-icon-wrapper {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .stat-card-compact .stat-info-wrapper {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .stat-card-compact .stat-label {
        font-size: 0.65rem;
        white-space: normal;
        line-height: 1.15;
    }
    .stat-card-compact .stat-value {
        font-size: 0.95rem;
    }
}

/* Section Header */
.section-header {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

/* Lists - Announcements & History */
.announcement-item, .history-item {
    background-color: var(--surface);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease;
}
.announcement-item.important {
    border-left: 4px solid var(--danger);
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    gap: 8px;
}
.item-title {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.35;
    color: var(--text-main);
}
.item-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.item-desc {
    font-size: 0.83rem;
    color: #475569;
    line-height: 1.48;
}

/* History Item Specific */
.history-item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.history-content {
    flex: 1;
    min-width: 0;
}
.history-status {
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

/* Journal Feed */
.journal-item {
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.journal-img {
    width: 100%;
    height: 180px;
    background-color: var(--border);
    object-fit: cover;
    display: block;
}
.journal-content {
    padding: 12px 14px;
}

/* Menu List */
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.menu-item:active {
    background-color: rgba(0, 0, 0, 0.03);
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.menu-item-text {
    flex: 1;
    font-weight: 600;
    font-size: 0.88rem;
}

/* Bottom Navigation - Glassmorphic */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border);
    z-index: 100;
    box-sizing: border-box;
}

[data-theme="dark"] .bottom-nav {
    background-color: rgba(31, 41, 55, 0.95);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    width: 20%;
    height: 100%;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.15s ease;
}
.nav-item span {
    font-size: 0.68rem;
    font-weight: 600;
}
.nav-item.active {
    color: var(--primary);
}
.nav-item.active i {
    transform: translateY(-2px);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 15px;
    backdrop-filter: blur(2px);
}
.modal-overlay.active {
    display: flex !important;
}

/* Role Visibility Protection Defaults */
.superadmin-only {
    display: none !important;
}
.admin-only {
    display: none;
}
.anggota-only {
    display: none;
}
.modal {
    background: var(--surface);
    border-radius: 16px;
    width: 95%;
    max-width: 480px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    box-sizing: border-box;
}
.modal-content {
    background: var(--surface);
    width: 95%;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 16px;
    padding: 16px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    box-sizing: border-box;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text-main);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease;
}
.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Print Styles */
@media print {
    .no-print, .bottom-nav, .topbar, .btn, .badge {
        display: none !important;
    }
    body, #app-container {
        background: white !important;
        color: black !important;
        margin: 0;
        padding: 0;
        height: auto;
    }
    .content-area {
        padding: 0;
        margin: 0;
    }
    /* Force accordions open and format as multi-column list for print */
    .print-expand {
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        margin-top: 10px !important;
    }
    .records-container {
        max-height: none !important;
        overflow: visible !important;
        border-top: 1px solid #000 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 5px 20px;
        padding-top: 10px !important;
    }
    .records-container > div {
        border-bottom: 1px dashed #ccc !important;
        padding: 4px 0 !important;
        margin-bottom: 0 !important;
    }
    .history-item {
        border: none !important;
        border-bottom: 2px solid #000 !important;
        border-radius: 0 !important;
        margin-bottom: 25px !important;
        page-break-inside: avoid;
    }
    .history-icon, .history-content .text-muted {
        display: none !important;
    }
    /* Dashboard Print Styles */
    #attendance-dashboard {
        display: flex !important;
        border: 2px solid #000;
        margin-bottom: 20px !important;
        padding: 5px 0;
    }
    #attendance-dashboard .card {
        border: none !important;
        border-right: 1px solid #ccc !important;
    }
    #attendance-dashboard .card:last-child {
        border-right: none !important;
    }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast-message {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 5px solid var(--danger);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .toast-message {
    background: #1f2937;
    color: #f9fafb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.toast-message.toast-error {
    border-left-color: var(--danger);
}
.toast-message.toast-success {
    border-left-color: var(--success);
}
.toast-message.toast-warning {
    border-left-color: #F59E0B;
}
.toast-message.toast-info {
    border-left-color: var(--blue);
}

.toast-message.hide {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Form Invalid State & Shake */
.form-control.is-invalid, input.is-invalid, select.is-invalid {
    border-color: var(--danger) !important;
    background-color: rgba(239, 68, 68, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.shake-animation {
    animation: shake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

.alert-danger {
    background-color: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* Switch Component for Settings */
.switch input:checked + .slider {
    background-color: var(--primary) !important;
}
.switch input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Badge Pusat */
.badge-pusat {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
    font-weight: 700;
}
[data-theme="dark"] .badge-pusat {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

/* =========================================================================
   Super Admin Proportional Mobile Dashboard Styles
   ========================================================================= */
.sa-hero-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}
.sa-hero-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.3) 0%, rgba(229, 57, 53, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
[data-theme="dark"] .sa-hero-card {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.sa-quick-hub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
}
.sa-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    text-align: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.sa-quick-btn:hover, .sa-quick-btn:active {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}
.sa-quick-btn i {
    font-size: 1.25rem;
}

.sa-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}
.sa-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 10px 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sa-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}
.sa-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.sa-stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.sa-stat-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    color: var(--text-muted);
}
.sa-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2px;
}
.sa-stat-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}
.sa-tier-box {
    padding: 8px 4px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.15s ease;
}
.sa-tier-box:hover {
    transform: translateY(-1px);
}
.sa-tier-box span {
    font-size: 0.7rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}
.sa-tier-box h3 {
    margin: 1px 0;
    font-size: 1.15rem;
    font-weight: 800;
}
.sa-tier-box small {
    font-size: 0.64rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
}

.sa-search-bar-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}
@media (max-width: 440px) {
    .sa-search-bar-wrap {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Impersonation Banner for Super Admin Unit Management */
.impersonation-banner {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.06);
    position: relative;
    animation: fadeInSlideDown 0.25s ease-out;
    width: 100%;
    box-sizing: border-box;
}

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

/* --- Penilaian Anggota Styles --- */
.subtab-buttons-container {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}
.subtab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.subtab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.dark-theme .subtab-buttons-container {
    background: #1e293b;
}
.dark-theme .subtab-btn {
    color: #94a3b8;
}
.dark-theme .subtab-btn.active {
    background: #334155;
    color: #ffffff;
}

/* Star Rating Visual Styles */
.star-rating-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #eab308;
    font-size: 1rem;
    vertical-align: middle;
}
.star-rating-lg {
    font-size: 1.6rem;
    gap: 4px;
}
.star-score-text {
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 6px;
    color: var(--text-dark);
}

/* Penilaian Table & Card */
.penilaian-row {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--border);
}
.penilaian-row:hover {
    background-color: rgba(0,0,0,0.015);
}
.dark-theme .penilaian-row:hover {
    background-color: rgba(255,255,255,0.02);
}
.penilaian-score-input {
    width: 65px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-dark);
}
.penilaian-score-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(229,57,53,0.15);
}

/* =========================================================================
   Mobile Visibility & Icon-only Utilities
   ========================================================================= */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-flex { display: inline-flex !important; }
    .d-sm-block { display: block !important; }
}

@media (max-width: 575.98px) {
    .btn-icon-only-sm {
        padding: 5px 8px !important;
        font-size: 1rem !important;
    }
    .btn-icon-only-sm span {
        display: none !important;
    }
    .card {
        border-radius: 12px;
        margin-bottom: 8px;
    }
    .history-item {
        padding: 10px 10px;
    }
}

/* =========================================================================
   PMR Gamification & SKU Evaluator Engine Styles (Modern v2.9)
   ========================================================================= */
.gamif-hero-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gamif-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15,23,42,0.3) !important;
}

/* Dynamic Tier Accents */
.hero-wira {
    border-top: 4px solid #f59e0b !important;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}
.hero-madya {
    border-top: 4px solid #0284c7 !important;
    background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 100%) !important;
}
.hero-mula {
    border-top: 4px solid #16a34a !important;
    background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%) !important;
}

.gamif-badge-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.gamif-badge-item.badge-unlocked:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(245,158,11,0.25) !important;
}

/* Category Progress Tracker */
.cat-progress-card {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.cat-progress-card:hover {
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.cat-progress-card.active {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 4px 14px rgba(245,158,11,0.15);
}
.cat-progress-card:active {
    transform: scale(0.98);
}

/* Sku Item Spotlight Animation */
@keyframes skuSpotlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
        border-color: #f59e0b;
        transform: translateY(-2px) scale(1);
    }
    40% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.25);
        border-color: #d97706;
        transform: translateY(-3px) scale(1.015);
    }
    100% {
        box-shadow: 0 4px 14px rgba(0,0,0,0.06);
        border-color: var(--border);
        transform: translateY(0) scale(1);
    }
}
.sku-item-spotlight {
    animation: skuSpotlightPulse 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    border-color: #f59e0b !important;
}

/* Quest Action Cards */
.quest-action-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
    overflow: hidden;
}
.quest-action-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.quest-action-card.verified {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #86efac;
}
.quest-action-card.revised {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-color: #fed7aa;
}

/* Gamif Filter Pills */
.gamif-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.gamif-pill:hover {
    border-color: #f59e0b;
    color: #b45309;
}
.gamif-pill.active {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

/* =========================================================================
   Top 5 Stepped Podium Layout (Margin-Safe & Fully Responsive)
   ========================================================================= */
.podium-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 32px rgba(15,23,42,0.35);
    position: relative;
    overflow: hidden;
    padding: 24px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
}

.podium-top5-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 4px 0 4px;
    box-sizing: border-box;
}

.podium-pillar {
    flex: 1 1 0;
    min-width: 0;
    max-width: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease;
    box-sizing: border-box;
    padding: 0 2px;
}
.podium-pillar:hover {
    transform: translateY(-5px);
}

.podium-avatar-wrap {
    position: relative;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.podium-avatar-img {
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}

.podium-name-label {
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    padding: 0 2px;
    margin-bottom: 2px;
}

.podium-sub-label {
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    padding: 0 2px;
    margin-bottom: 6px;
}

.podium-block {
    width: 100%;
    box-sizing: border-box;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 4px;
    text-align: center;
    color: #ffffff;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

/* Rank 1: Gold Center */
.podium-rank-1 .podium-block {
    height: 190px;
    background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 12px 32px rgba(245,158,11,0.4);
    border: 2px solid #fef08a;
}
.podium-rank-1 .podium-avatar-img {
    width: 64px;
    height: 64px;
    border: 3px solid #fbbf24;
    box-shadow: 0 0 16px rgba(251,191,36,0.6);
}

/* Rank 2: Silver Left */
.podium-rank-2 .podium-block {
    height: 155px;
    background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
    box-shadow: 0 8px 24px rgba(148,163,184,0.35);
    border: 2px solid #e2e8f0;
}
.podium-rank-2 .podium-avatar-img {
    width: 54px;
    height: 54px;
    border: 3px solid #cbd5e1;
}

/* Rank 3: Bronze Right */
.podium-rank-3 .podium-block {
    height: 130px;
    background: linear-gradient(180deg, #d97706 0%, #78350f 100%);
    box-shadow: 0 8px 24px rgba(217,119,6,0.3);
    border: 2px solid #fed7aa;
}
.podium-rank-3 .podium-avatar-img {
    width: 52px;
    height: 52px;
    border: 3px solid #fdba74;
}

/* Rank 4: Sapphire Far Left */
.podium-rank-4 .podium-block {
    height: 105px;
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 6px 18px rgba(2,132,199,0.25);
    border: 1.5px solid #bae6fd;
}
.podium-rank-4 .podium-avatar-img {
    width: 44px;
    height: 44px;
    border: 2px solid #38bdf8;
}

/* Rank 5: Amethyst/Star Far Right */
.podium-rank-5 .podium-block {
    height: 90px;
    background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 6px 18px rgba(124,58,237,0.25);
    border: 1.5px solid #ddd6fe;
}
.podium-rank-5 .podium-avatar-img {
    width: 42px;
    height: 42px;
    border: 2px solid #a78bfa;
}

/* Tablet & Mobile Breakpoints for Margin Safety & Zero Collision */
@media (max-width: 768px) {
    .podium-container {
        padding: 20px 12px;
        margin-bottom: 20px;
    }
    .podium-top5-wrapper {
        gap: 6px;
        padding: 12px 2px 0 2px;
    }
    .podium-pillar {
        max-width: 105px;
    }
    .podium-rank-1 .podium-block { height: 160px; }
    .podium-rank-2 .podium-block { height: 130px; }
    .podium-rank-3 .podium-block { height: 110px; }
    .podium-rank-4 .podium-block { height: 88px; }
    .podium-rank-5 .podium-block { height: 75px; }
}

@media (max-width: 540px) {
    .podium-container {
        padding: 16px 8px;
        margin-bottom: 16px;
    }
    .podium-top5-wrapper {
        gap: 4px;
        padding: 10px 0 0 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: center;
        scrollbar-width: none;
    }
    .podium-top5-wrapper::-webkit-scrollbar {
        display: none;
    }
    .podium-pillar {
        min-width: 60px;
        padding: 0 1px;
    }
    .podium-rank-1 .podium-block { height: 135px; padding: 8px 2px; }
    .podium-rank-2 .podium-block { height: 110px; padding: 8px 2px; }
    .podium-rank-3 .podium-block { height: 95px; padding: 8px 2px; }
    .podium-rank-4 .podium-block { height: 78px; padding: 6px 2px; }
    .podium-rank-5 .podium-block { height: 65px; padding: 6px 2px; }
    
    .podium-rank-1 .podium-block span:first-child { font-size: 1.25rem !important; }
    .podium-rank-2 .podium-block span:first-child { font-size: 1.1rem !important; }
    .podium-rank-3 .podium-block span:first-child { font-size: 1.05rem !important; }
    .podium-rank-4 .podium-block span:first-child { font-size: 0.95rem !important; }
    .podium-rank-5 .podium-block span:first-child { font-size: 0.95rem !important; }

    .podium-block span:last-child { font-size: 0.62rem !important; }
    .podium-name-label { font-size: 0.7rem !important; }
    .podium-sub-label { font-size: 0.62rem !important; }
}

/* Sticky My Rank Bar */
.sticky-my-rank-bar {
    position: sticky;
    bottom: 74px;
    z-index: 90;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 12px 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border: 1.5px solid #f59e0b;
    margin-top: 16px;
}

.dark-theme .gamif-badges-grid .badge-locked {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* ============================================================
   BERANDA HERO: BUKU SKILL DIGITAL & PORTOFOLIO PMR
   ============================================================ */
.beranda-sku-hero-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 14px;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(30, 27, 75, 0.22);
    position: relative;
    overflow: hidden;
}

.beranda-sku-hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.beranda-sku-hero-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.beranda-sku-hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    flex: 1;
}

.beranda-sku-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
    flex-shrink: 0;
}

.beranda-sku-hero-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.beranda-sku-hero-subtitle {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.35;
    margin-top: 2px;
    display: block;
}

.beranda-sku-pills-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.beranda-sku-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.beranda-sku-pill-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.beranda-sku-pill-info {
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.beranda-sku-pill-success {
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.beranda-sku-hero-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.beranda-btn-action-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e1b4b !important;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 7px 14px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.beranda-btn-action-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.beranda-btn-action-glass {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.beranda-btn-action-glass:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

@media (max-width: 540px) {
    .beranda-sku-hero-card {
        padding: 12px 14px;
    }
    .beranda-sku-hero-left {
        min-width: 100%;
    }
    .beranda-sku-hero-actions {
        width: 100%;
        margin-top: 4px;
    }
    .beranda-btn-action-primary,
    .beranda-btn-action-glass {
        flex: 1;
        justify-content: center;
        padding: 7px 8px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   PWA SMART INSTALL BANNER & MODAL (Add-to-Home-Screen)
   ========================================================================== */
.pwa-install-floating-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 140%);
    width: calc(100% - 32px);
    max-width: 480px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(220, 38, 38, 0.18);
    box-shadow: 0 16px 36px -6px rgba(220, 38, 38, 0.18), 0 6px 16px rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 14px 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.pwa-install-floating-banner.pwa-banner-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-banner-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
}

.pwa-banner-desc {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.35;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-pwa-dismiss {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pwa-dismiss:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-pwa-install {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pwa-install:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.45);
}

/* PWA Modal Backdrops & Dialogs */
.pwa-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.pwa-modal-backdrop.pwa-modal-active {
    opacity: 1;
    pointer-events: auto;
}

.pwa-modal-box {
    background: #ffffff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-modal-backdrop.pwa-modal-active .pwa-modal-box {
    transform: scale(1);
}

.pwa-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pwa-modal-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.pwa-modal-close:hover {
    color: #334155;
    background: #f1f5f9;
}

.pwa-modal-body {
    padding: 20px;
}

.pwa-ios-steps {
    padding-left: 20px;
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.6;
}

.pwa-ios-steps li {
    margin-bottom: 10px;
}

.pwa-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #0284c7;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9rem;
    vertical-align: middle;
    margin: 0 2px;
}

.pwa-modal-footer-note {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-modal-footer {
    padding: 12px 20px 16px 20px;
    display: flex;
    justify-content: flex-end;
}

.btn-pwa-modal-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
}

.btn-pwa-modal-btn:hover {
    background: #b91c1c;
}

