/* ==========================================================================
   DropBox Shanti — stylesheet utama
   ========================================================================== */

:root {
    --brand: #5b4bf5;
    --brand-2: #8b5cf6;
    --brand-soft: rgba(91, 75, 245, 0.1);
    --brand-glow: rgba(91, 75, 245, 0.35);
    --ink: #101828;
    --body-bg: #f5f6fb;
    --surface: #ffffff;
    --surface-2: #fafbff;
    --line: #e6e8f0;
    --muted: #667085;
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.12);
    --navbar-bg: rgba(255, 255, 255, 0.85);
}

[data-bs-theme="dark"] {
    --ink: #e9ecf5;
    --body-bg: #0b0d17;
    --surface: #141726;
    --surface-2: #1a1e30;
    --line: #262b40;
    --muted: #98a2b3;
    --brand-soft: rgba(139, 92, 246, 0.16);
    --navbar-bg: rgba(11, 13, 23, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: var(--body-bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}
.fw-600 {
    font-weight: 600;
}
.fw-700 {
    font-weight: 700;
}
.fw-800 {
    font-weight: 800;
    letter-spacing: -0.02em;
}
.text-brand {
    color: var(--brand) !important;
}
.min-w-0 {
    min-width: 0;
}

/* ---------- Navbar ---------- */
.app-navbar {
    background: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.app-navbar .nav-link {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.93rem;
    border-radius: 10px;
    padding: 0.45rem 0.75rem !important;
    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.app-navbar .nav-link:hover {
    color: var(--ink);
    background: var(--brand-soft);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px var(--brand-glow);
}

.brand-mark-lg {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.5rem;
    display: flex;
}

.app-navbar .navbar-brand {
    color: var(--ink);
    font-size: 1.15rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    transition: all 0.18s ease;
}

.btn-icon:hover {
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
}

/* ---------- Buttons ---------- */
.btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px var(--brand-glow);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.btn-brand:hover,
.btn-brand:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px var(--brand-glow);
    filter: brightness(1.05);
}

.btn-brand:disabled {
    opacity: 0.55;
    transform: none;
    box-shadow: none;
    color: #fff;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 200px;
    background: linear-gradient(135deg, #4c3ce0 0%, #6d5bf7 45%, #a855f7 100%);
    color: #fff;
}

[data-bs-theme="dark"] .hero {
    background: linear-gradient(135deg, #241b6b 0%, #3b2ba8 45%, #5b21b6 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 140px;
    background: var(--body-bg);
    clip-path: ellipse(120% 100% at 50% 100%);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    z-index: 1;
    animation: float 14s ease-in-out infinite;
}

.hero-blob-1 {
    width: 420px;
    height: 420px;
    background: #22d3ee;
    top: -140px;
    right: -80px;
}

.hero-blob-2 {
    width: 360px;
    height: 360px;
    background: #f472b6;
    bottom: -160px;
    left: -100px;
    animation-delay: -6s;
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(20px, -26px, 0) scale(1.06);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 0.6rem;
}

.hero-sub {
    font-size: 1.06rem;
    color: rgba(255, 255, 255, 0.86);
    max-width: 34rem;
    margin-bottom: 1.4rem;
}

.hero-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.7rem;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.22rem 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.hero-points i {
    color: #6ee7b7;
    font-size: 1.05rem;
}

/* ---------- Upload card ---------- */
.upload-card {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dropzone {
    border: 2px dashed rgba(91, 75, 245, 0.35);
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 34px 20px;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.22s ease,
        background-color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
    outline: none;
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-3px);
    box-shadow: 0 16px 34px var(--brand-glow);
}

.dz-icon {
    font-size: 2.6rem;
    color: var(--brand);
    display: block;
    margin-bottom: 0.6rem;
    transition: transform 0.22s ease;
}

.dropzone:hover .dz-icon,
.dropzone.is-dragover .dz-icon {
    transform: translateY(-4px) scale(1.06);
}

.dz-title {
    font-weight: 700;
    font-size: 1.05rem;
}
.dz-sub {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 0.15rem;
}
.dz-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
}
.dz-hint {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.7rem;
}

/* Daftar file terpilih */
.file-list {
    margin-top: 0.9rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 0.5rem;
    animation: slideIn 0.22s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.file-item-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
}

.file-item-body {
    flex: 1 1 auto;
    min-width: 0;
}

.file-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.78rem;
    color: var(--muted);
}

.file-item-remove {
    border: none;
    background: transparent;
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: all 0.18s ease;
}

.file-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.file-item.is-done .file-item-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
}
.file-item.is-error .file-item-icon {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
}

/* Captcha */
.captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 1rem 0;
    padding: 0.75rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.captcha-label {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--ink);
}
.captcha-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.captcha-actions .form-control {
    width: 108px;
}

/* Tombol naik/turun angka (spinner) dibuat lebih besar agar mudah diklik */
.captcha-actions input[type="number"] {
    height: 40px;
    font-size: 1.05rem;
    padding-right: 0.3rem;
}
.captcha-actions input[type="number"]::-webkit-inner-spin-button {
    height: 38px;
    width: 26px;
    opacity: 1;
    cursor: pointer;
}
.captcha-actions #captchaRefresh {
    height: 40px;
    width: 40px;
    font-size: 1.15rem;
}

/* Progress */
.upload-progress {
    margin-top: 1rem;
}
.upload-progress .progress {
    height: 8px;
    border-radius: 999px;
    background: var(--brand-soft);
}
.upload-progress .progress-bar {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    transition: width 0.25s ease;
}

/* Hasil upload */
.upload-results {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    margin-bottom: 0.55rem;
}

.result-success {
    border-left: 3px solid #10b981;
}
.result-failed {
    border-left: 3px solid #ef4444;
}

.result-body {
    flex: 1 1 auto;
    min-width: 0;
}
.result-name {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

.link-box {
    margin-bottom: 1rem;
}

/* ---------- Statistik ---------- */
.stats-section {
    margin-top: -140px;
    position: relative;
    z-index: 3;
    padding-bottom: 10px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.1rem;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(91, 75, 245, 0.4);
}

.stat-card-sm {
    padding: 1.1rem 0.9rem;
    text-align: left;
}

.stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.25rem;
}

.stat-card-sm .stat-icon {
    margin: 0 0 0.55rem;
}

.stat-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

/* ---------- Section umum ---------- */
.section {
    padding: 64px 0;
}
.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    margin-bottom: 2.2rem;
}

.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.025em;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
    height: 100%;
    position: relative;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.step-card h5 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.step-card p {
    color: var(--muted);
    margin: 0;
    font-size: 0.92rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 8px 18px var(--brand-glow);
    margin-bottom: 1rem;
}

/* ---------- Dukungan / donasi ---------- */
.support-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    height: 100%;
}

.donor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.donor-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--line);
}

.donor-item:last-child {
    border-bottom: none;
}

.donor-rank {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 24px;
}

.donor-name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.donor-amount {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--brand);
    white-space: nowrap;
}

.supporter-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    height: 100%;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.supporter-card:hover {
    transform: translateY(-3px);
    border-color: rgba(91, 75, 245, 0.45);
    box-shadow: var(--shadow);
}

.supporter-amount {
    font-size: 0.78rem;
    color: var(--brand);
    font-weight: 700;
}
.supporter-message {
    font-size: 0.88rem;
    color: var(--muted);
    font-style: italic;
}

.notice-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius);
    background: linear-gradient(
        135deg,
        var(--brand-soft),
        rgba(139, 92, 246, 0.12)
    );
    border: 1px solid rgba(91, 75, 245, 0.25);
}

/* ---------- Avatar ---------- */
.avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    text-transform: uppercase;
}

.avatar-sm {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    font-size: 0.72rem;
}
.avatar-lg {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    font-size: 1.3rem;
}

/* ---------- Halaman file ---------- */
.file-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.7rem;
    box-shadow: var(--shadow);
}

.file-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.file-icon-lg {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.6rem;
    color: var(--brand);
    background: var(--brand-soft);
}

.file-name {
    font-size: 1.25rem;
    font-weight: 700;
    word-break: break-word;
    margin-bottom: 0.35rem;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    color: var(--muted);
    font-size: 0.84rem;
}

/* ---------- Auth ---------- */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem 1.7rem;
    box-shadow: var(--shadow);
}

.auth-card .form-control,
.auth-card .input-group-text {
    border-color: var(--line);
    background: var(--surface);
}

.auth-card .input-group-text {
    color: var(--muted);
}

/* ---------- Panel dashboard ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-head {
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--line);
}

.panel .table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}
.panel .table > thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    padding: 0.8rem 1rem;
}

.panel .table > tbody td {
    padding: 0.95rem 1rem;
    border-color: var(--line);
}
.file-row-name {
    max-width: 320px;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}
.empty-state i {
    font-size: 2.6rem;
    color: var(--brand);
    display: block;
    margin-bottom: 0.8rem;
}

.error-code {
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* ---------- Flash & toast ---------- */
.flash-area {
    position: fixed;
    top: 82px;
    right: 20px;
    z-index: 1080;
    width: min(380px, calc(100vw - 40px));
}

.flash-area .alert {
    font-size: 0.92rem;
    border: none;
}

.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(340px, calc(100vw - 48px));
}

.app-toast {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    animation: slideIn 0.2s ease;
}

.app-toast.is-error {
    border-left-color: #ef4444;
}
.app-toast.is-success {
    border-left-color: #10b981;
}

/* ---------- Footer ---------- */
.app-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 56px 0 28px;
    margin-top: 40px;
}

.app-footer p {
    max-width: 32rem;
    font-size: 0.92rem;
}

.footer-heading {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.footer-links li {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer-links a {
    color: var(--muted);
    transition: color 0.18s ease;
}
.footer-links a:hover {
    color: var(--brand);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero {
        padding: 48px 0 160px;
    }
    .stats-section {
        margin-top: -110px;
    }
    .hero-sub {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .upload-card {
        padding: 1.15rem;
    }
    .dropzone {
        padding: 26px 14px;
    }
    .stat-card {
        padding: 1rem 0.8rem;
    }
    .file-row-name {
        max-width: 190px;
    }
    .toast-stack,
    .flash-area {
        right: 12px;
        left: 12px;
        width: auto;
    }
}
