@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* 
   RUMREN LEGAL SYSTEM - PREMIUM LIGHT COMPACT DESIGN SYSTEM
*/

:root {
    --bs-body-bg: #f8fafc !important;
    --bs-body-color: #0f172a !important;
    --bg-dark: #f8fafc !important;
    --card-bg: #ffffff !important;
    --bg-body: #f8fafc !important;
    --text-main: #0f172a !important;
    --text-muted: #64748b !important;
    --primary: #dc2626;
    --primary-light: #ef4444;
    --glass-border: #e2e8f0;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
}

/* --- GLOBAL SINKRONISASI --- */
html,
body {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    overflow-x: clip !important;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif !important;
}

/* --- REUSABLE WRAPPER --- */
.dashboard-wrapper {
    padding: 12px 14px 100px;
    max-width: 820px;
    margin: 0 auto;
    min-width: 0;
    width: 100%;
}

/* --- PREMIUM WELCOME BANNER (Legal Edition) --- */
.welcome-banner {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md, 8px);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
}

.welcome-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    animation: shine-sweep 6s infinite ease-in-out;
    z-index: 1;
    pointer-events: none;
}

@keyframes shine-sweep {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.welcome-banner .legal-title-premium {
    color: #ffffff !important;
    margin-bottom: 2px;
}

.welcome-banner .legal-subtitle-premium {
    color: rgba(255, 255, 255, 0.9) !important;
}

.date-badge-premium {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: var(--radius-xs, 4px);
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff !important;
    flex-shrink: 0;
}

.date-badge-premium span,
.date-badge-premium i {
    color: #ffffff !important;
}

/* --- STAT CARD PREMIUM (Navigation Edition) --- */
.stat-card-premium {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm, 6px);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    color: #0f172a !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-card-premium:hover {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: #0f172a !important;
}

.stat-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: var(--radius-xs, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    flex-shrink: 0;
}

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

.stat-label-new {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 3px;
}

.stat-value-new {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a !important;
}

.stat-card-premium .text-white {
    color: #0f172a !important;
}

/* --- LEGAL DOCUMENT CARD (Full Width) --- */
.legal-doc-card-premium {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md, 8px);
    padding: 18px 20px;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .legal-doc-card-premium {
        padding: 28px 32px;
    }
}

.doc-section-title {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    padding-left: 10px;
    line-height: 1.35;
}

/* Theme Accents */
.tos-theme .doc-section-title {
    border-left: 3px solid #dc2626 !important;
}

.tos-theme .doc-section-number {
    color: #dc2626 !important;
}

.privacy-theme .doc-section-title {
    border-left: 3px solid #10b981 !important;
}

.privacy-theme .doc-section-number {
    color: #10b981 !important;
}

.disclaimers-theme .doc-section-title {
    border-left: 3px solid #f59e0b !important;
}

.disclaimers-theme .doc-section-number {
    color: #d97706 !important;
}

.playstore-theme .doc-section-title {
    border-left: 3px solid #3b82f6 !important;
}

.playstore-theme .doc-section-number {
    color: #2563eb !important;
}

/* Headings inside legal doc */
.legal-doc-card-premium h1,
.legal-doc-card-premium h2,
.legal-doc-card-premium h3,
.legal-doc-card-premium h4,
.legal-doc-card-premium h5,
.legal-doc-card-premium h6,
.legal-doc-card-premium .h1,
.legal-doc-card-premium .h2,
.legal-doc-card-premium .h3,
.legal-doc-card-premium .h4,
.legal-doc-card-premium .h5,
.legal-doc-card-premium .h6,
.legal-sub-sections h3,
.legal-sub-sections h3.text-white {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Sub-points and paragraphs */
.doc-content,
.doc-content p {
    color: #334155 !important;
    font-size: 0.85rem;
    line-height: 1.65;
}

.legal-sub-sections {
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.legal-sub-sections p,
.legal-sub-sections .smallest {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-sub-sections strong,
.doc-content strong {
    color: #0f172a;
    font-weight: 600;
}

.legal-sub-sections ul,
.legal-sub-sections ol {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    color: #475569;
}

.legal-sub-sections li {
    margin-bottom: 0.35rem;
}

.smallest {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

/* Links inside document */
.legal-doc-card-premium a,
.legal-sub-sections a,
.legal-doc-card-premium a.text-white {
    color: #dc2626 !important;
    text-decoration: underline !important;
    font-weight: 600;
}

.legal-doc-card-premium a:hover,
.legal-sub-sections a:hover,
.legal-doc-card-premium a.text-white:hover {
    color: #b91c1c !important;
}

/* Fix any remaining text-white inside doc cards */
.legal-doc-card-premium .text-white:not(.badge):not(.btn) {
    color: #0f172a !important;
}

/* Back button and bottom action bar */
.legal-back-btn,
.dashboard-wrapper a.text-white:not(.welcome-banner *),
.dashboard-wrapper .btn-link.text-white {
    color: #64748b !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.legal-back-btn:hover,
.dashboard-wrapper a.text-white:not(.welcome-banner *):hover,
.dashboard-wrapper .btn-link.text-white:hover {
    color: #dc2626 !important;
}

.legal-footer-info,
.dashboard-wrapper .d-flex.opacity-60,
.dashboard-wrapper .text-center.opacity-40 {
    opacity: 1 !important;
    color: #94a3b8 !important;
}

/* --- TYPOGRAPHY REDESIGN --- */
.legal-title-premium {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 3px;
}

.legal-subtitle-premium {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

.anim-fade-up {
    animation: fadeUp 0.3s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small adjustments for mobile */
@media (max-width: 480px) {
    .dashboard-wrapper {
        padding: 8px 10px 90px;
    }

    .welcome-banner {
        padding: 0.75rem 0.9rem;
    }

    .legal-title-premium {
        font-size: 1.15rem;
    }

    .legal-subtitle-premium {
        font-size: 0.65rem;
    }

    .legal-doc-card-premium {
        padding: 14px;
        border-radius: var(--radius-sm, 6px);
    }

    .doc-section-title {
        font-size: 0.88rem;
    }

    .doc-content,
    .legal-sub-sections {
        font-size: 0.78rem;
    }
}