:root {
    --sepiah-dark-purple: #3b1361;
    --sepiah-purple: #6a1b9a;
    --sepiah-magenta: #c2185b;
    --sepiah-pink: #e91e8c;
    --sepiah-bg: #f7f5fb;
    --sepiah-text-muted: #6c6480;
    --sepiah-border: #ece6f5;
    --sepiah-shadow-sm: 0 2px 8px rgba(59, 19, 97, 0.06);
    --sepiah-shadow-md: 0 8px 24px rgba(59, 19, 97, 0.10);
    --sepiah-shadow-lg: 0 20px 50px rgba(59, 19, 97, 0.35);
    --sepiah-radius: 18px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--sepiah-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2a2140;
    letter-spacing: 0.1px;
}

/* ---------- Guest (login/register) ---------- */
.guest-body {
    background: linear-gradient(160deg, var(--sepiah-dark-purple) 0%, var(--sepiah-purple) 45%, var(--sepiah-magenta) 100%);
    min-height: 100vh;
}

.guest-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.guest-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--sepiah-shadow-lg);
    animation: sepiah-rise 0.35s ease both;
}

.guest-brand {
    text-align: center;
    margin-bottom: 28px;
}

.guest-brand h1 {
    font-size: 27px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--sepiah-purple), var(--sepiah-magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.guest-brand p {
    color: var(--sepiah-text-muted);
    font-size: 14px;
    margin: 0;
}

/* ---------- Buttons ---------- */
.btn-sepiah {
    background: linear-gradient(90deg, var(--sepiah-purple), var(--sepiah-magenta));
    background-size: 140% 140%;
    background-position: 0% 50%;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 13px 16px;
    border-radius: 14px;
    width: 100%;
    box-shadow: 0 8px 18px rgba(106, 27, 154, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-position 0.25s ease;
}

.btn-sepiah:hover, .btn-sepiah:focus {
    color: #fff;
    background-position: 100% 50%;
    box-shadow: 0 10px 22px rgba(106, 27, 154, 0.36);
    transform: translateY(-1px);
}

.btn-sepiah:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(106, 27, 154, 0.3);
}

.btn-sepiah:disabled {
    opacity: 0.55;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success {
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-outline-secondary:hover,
.btn-outline-danger:hover,
.btn-outline-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59, 19, 97, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    border-radius: 10px;
}

/* ---------- Inputs ---------- */
.form-control-sepiah,
.form-select.form-control-sepiah {
    border-radius: 13px;
    padding: 12px 16px;
    border: 1.5px solid var(--sepiah-border);
    min-height: 48px;
    background-color: #fbfaff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control-sepiah:focus {
    border-color: var(--sepiah-purple);
    box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.12);
    background-color: #fff;
}

.form-control-sepiah::placeholder {
    color: #b3a9c7;
}

.form-label {
    font-weight: 600;
    font-size: 13.5px;
    color: #4a3f60;
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--sepiah-purple);
    border-color: var(--sepiah-purple);
}

.form-check-input:focus {
    border-color: var(--sepiah-purple);
    box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.15);
}

/* ---------- App shell (user, mobile-first) ---------- */
.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--sepiah-bg);
    padding-bottom: 96px;
    position: relative;
}

.app-topheader {
    background: linear-gradient(135deg, var(--sepiah-dark-purple), var(--sepiah-purple) 55%, var(--sepiah-magenta) 140%);
    color: #fff;
    padding: 22px 20px 32px;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 10px 28px rgba(59, 19, 97, 0.22);
}

.app-topheader h5 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.app-topheader small {
    opacity: 0.85;
}

.app-content {
    padding: 16px;
}

/* ---------- Cards ---------- */
.card-sepiah {
    background: #fff;
    border-radius: var(--sepiah-radius);
    padding: 18px;
    box-shadow: var(--sepiah-shadow-md);
    margin-bottom: 16px;
    border: 1px solid rgba(59, 19, 97, 0.04);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

a.card-sepiah,
a .card-sepiah {
    display: block;
}

a.card-sepiah:hover,
.card-sepiah.is-interactive:hover {
    box-shadow: 0 14px 30px rgba(59, 19, 97, 0.14);
    transform: translateY(-2px);
}

.badge-status {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.bg-status-draft { background: #ececec; color: #555; }
.bg-status-submitted { background: #e3e0f7; color: #4a3aa8; }
.bg-status-review { background: #fff3cd; color: #8a6d00; }
.bg-status-revision { background: #ffe4d1; color: #b8500e; }
.bg-status-verified { background: #d7f0ff; color: #0a6ea8; }
.bg-status-approved { background: #d9f4e2; color: #147a3f; }
.bg-status-rejected { background: #fbdcdf; color: #a3172b; }
.bg-status-payment { background: #fff0d9; color: #a8620a; }
.bg-status-paid { background: #d9f4e2; color: #147a3f; }
.bg-status-issued { background: #e0d9f7; color: #5a2ea6; }
.bg-status-completed { background: #d9f4e2; color: #147a3f; }
.bg-status-cancelled { background: #ececec; color: #777; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -6px 24px rgba(59, 19, 97, 0.14);
    display: flex;
    border-radius: 24px 24px 0 0;
    padding: 10px 6px;
    z-index: 100;
    border-top: 1px solid rgba(59, 19, 97, 0.06);
}

.bottom-nav a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--sepiah-text-muted);
    font-size: 10.5px;
    font-weight: 600;
    padding: 7px 2px;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 14px;
    position: relative;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.bottom-nav a:active {
    background-color: rgba(106, 27, 154, 0.08);
}

.bottom-nav a.active {
    color: var(--sepiah-magenta);
    font-weight: 700;
}

.bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--sepiah-purple), var(--sepiah-magenta));
}

.bottom-nav svg {
    width: 22px;
    height: 22px;
}

.bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.5;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.bottom-nav a.active .nav-icon {
    opacity: 1;
    transform: translateY(-1px);
}

/* ---------- Home shortcuts ---------- */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shortcut-item {
    background: #fff;
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    color: #2a2140;
    box-shadow: var(--sepiah-shadow-md);
    min-height: 44px;
    border: 1px solid rgba(59, 19, 97, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shortcut-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(59, 19, 97, 0.14);
}

.shortcut-item:active {
    transform: translateY(0);
}

.shortcut-item .icon {
    font-size: 26px;
    margin-bottom: 8px;
    width: 46px;
    height: 46px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f1e9fa, #fbe9f2);
}

.shortcut-item .icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--sepiah-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1e9fa, #fbe9f2);
    margin-bottom: 14px;
}

.empty-state p {
    font-size: 14px;
    max-width: 260px;
    line-height: 1.5;
}

/* ---------- Notifications ---------- */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 10px;
    box-shadow: var(--sepiah-shadow-sm);
    border: 1px solid rgba(59, 19, 97, 0.04);
    transition: box-shadow 0.15s ease;
}

.notification-item.unread {
    background: #f6f0fb;
    border-left: 3px solid var(--sepiah-magenta);
}

.alert-sepiah {
    border-radius: 14px;
    border: none;
    padding: 14px 16px;
    box-shadow: var(--sepiah-shadow-sm);
}

/* ---------- Pills / Tabs ---------- */
.nav-pills .nav-link {
    color: var(--sepiah-purple);
    background: #f0eaf8;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 18px;
    transition: all 0.15s ease;
}

.nav-pills .nav-link:hover {
    background: #e5d9f2;
}

.nav-pills .nav-link.active {
    background: linear-gradient(90deg, var(--sepiah-purple), var(--sepiah-magenta));
    color: #fff;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
}

/* ---------- Motion ---------- */
@keyframes sepiah-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
