/* ====== MiuOne Wallet — base styles ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--c-bg, #eef2f8);
    color: var(--c-text, #111111);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px 24px;
    position: relative;
    isolation: isolate;
}

body.dashboard-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 !important;
    padding-top: var(--nav-h, 60px) !important;
    overflow-x: hidden;
    isolation: auto;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Hero (auth pages) */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-left: -50px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0s both;
}
.logo { width: 120px; height: auto; object-fit: contain; flex-shrink: 0; display: block; }
h1 { font-size: 36px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; color: #111111; }
.subtitle { width: 100%; font-size: 14px; color: #888888; margin-bottom: 32px; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.divider  { width: 32px; height: 1px; background: #e5e5e5; margin-bottom: 28px; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: auto; min-width: 160px; max-width: 100%;
    height: 44px; padding: 0 28px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: all 0.2s ease; letter-spacing: 0.01em;
    border: 1.5px solid transparent;
}
.btn-primary   { background: #111111; color: #ffffff; border-color: #111111; }
.btn-primary:hover { background: #333333; border-color: #333333; }
.btn-secondary { background: transparent; color: #111111; border-color: #e0e0e0; }
.btn-secondary:hover { border-color: #999999; color: #444444; }
.btn-ghost     { background: transparent; color: #999999; border-color: transparent; }
.btn-ghost:hover { color: #444444; }
.btn-danger    { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger-hover); border-color: var(--c-danger-hover); }
.btn:disabled  { opacity: 0.5; cursor: not-allowed; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.field-label { font-size: 12px; font-weight: 500; color: var(--c-text-mut); letter-spacing: 0.02em; }
.field-hint   { font-size: 11px; color: var(--c-text-soft); margin-top: 2px; }
.field input, .field textarea, .field select {
    width: 100%; height: 44px; padding: 0 14px;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-bg-elev);
    color: var(--c-text);
    font-family: 'Inter', sans-serif; font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--c-text); }

/* Form errors */
.form-errors { background: #fff7f7; border: 1px solid #f3d6d6; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.form-errors p { font-size: 13px; color: var(--c-danger); }

/* Auth form */
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 14px; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.auth-form .btn { width: 100%; min-width: 0; margin-top: 4px; }
.auth-alt  { font-size: 13px; color: #888; margin-top: 16px; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.auth-alt a { color: #111; text-decoration: none; border-bottom: 1px solid #e5e5e5; transition: border-color 0.2s; }
.auth-alt a:hover { border-bottom-color: #111; }

/* Footer note / legal */
.footer-note  { width: 100%; margin-top: 48px; font-size: 11px; color: #cccccc; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.legal-links  { width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.legal-links a { font-size: 11px; color: #cccccc; text-decoration: none; transition: color 0.2s; }
.legal-links a:hover { color: #888; }
.legal-links .legal-sep { font-size: 11px; color: #999; }

/* Toast */
.toast-wrap { position: fixed; bottom: 28px; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 48px); z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; background: #fff; border: 1px solid var(--c-border); border-radius: 10px; box-shadow: var(--c-shadow-toast); font-size: 13px; font-weight: 500; color: var(--c-text); pointer-events: auto; animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1) both; min-width: 220px; max-width: 360px; }
.toast.toast-success { border-color: var(--c-credit-bd); }
.toast.toast-error   { border-color: var(--c-debit-bd); }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.toast-success .toast-dot { background: var(--c-credit-text); }
.toast-error   .toast-dot { background: var(--c-debit-text); }

/* Empty state */
.empty-state { background: var(--c-bg-elev); border: 1px solid var(--c-border); border-radius: 14px; padding: 48px 24px; text-align: center; color: var(--c-text-soft); font-size: 14px; }

/* Pill */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; border: 1px solid var(--c-border); color: var(--c-text-mut); }
.pill-credit  { background: var(--c-credit-bg);  border-color: var(--c-credit-bd);  color: var(--c-credit-text); }
.pill-debit   { background: var(--c-debit-bg);   border-color: var(--c-debit-bd);   color: var(--c-debit-text); }
.pill-pending { background: var(--c-pending-bg); border-color: var(--c-pending-bd); color: var(--c-pending-text); }

@keyframes fadeUp {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes toastIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Responsive auth */
@media (max-width: 600px) {
    body { padding: 28px 18px; }
    .hero { margin-left: 0; gap: 8px; }
    .logo { width: 80px; }
    h1 { font-size: 30px; }
}
@media (max-width: 380px) {
    .logo { width: 64px; }
    h1 { font-size: 26px; }
}
