* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fc;
    color: #1A1F36;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
}

.app {
    width: 100%;
    max-width: 420px;
    padding-top: 8px;
}

/* Header */
.app-header {
    padding: 16px 0 24px;
    text-align: center;
}
.app-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1A1F36;
    letter-spacing: -0.02em;
}
.app-header h1 .accent {
    color: #3375BB;
}

/* Cards */
.card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.card-label {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

/* Amount hero */
.amount-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.amount-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1A1F36;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-family: inherit;
    min-width: 0;
    padding: 0;
}
.amount-input::placeholder { color: #C7CAD1; }
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input[type=number] { -moz-appearance: textfield; }

.max-pill {
    padding: 8px 14px;
    background: #EFF3F9;
    color: #3375BB;
    border: 1px solid #DCE4EF;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all 0.15s;
    font-family: inherit;
}
.max-pill:hover { background: #E4EBF5; }
.max-pill:disabled { opacity: 0.5; cursor: not-allowed; }

.usd-line {
    margin-top: 8px;
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

/* Token card */
.token-card {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s;
    padding: 16px 18px;
}
.token-card:hover { background: #F9FAFB; }

.token-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #3375BB;
}
.token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}

.token-meta {
    flex: 1;
    min-width: 0;
}
.token-sym {
    font-size: 16px;
    font-weight: 700;
    color: #1A1F36;
    letter-spacing: -0.01em;
}
.token-nm {
    font-size: 13px;
    color: #6B7280;
    margin-top: 2px;
}

/* Chevron */
.chev path { stroke: #9CA3AF; }

/* Recipient field */
.field {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.field-label {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}
.field-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #1A1F36;
    font-size: 13px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    padding: 0;
    letter-spacing: 0.01em;
}
.field-input::placeholder { color: #C7CAD1; }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: #3375BB;
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: all 0.15s;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(51,117,187,0.2);
}
.btn-primary:hover:not(:disabled) { background: #2861A0; }
.btn-primary:active:not(:disabled) { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: #3375BB;
    border: 1px solid #DCE4EF;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 8px;
}
.btn-secondary:hover:not(:disabled) { background: #F0F4FA; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status */
.status-message {
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
    word-break: break-word;
    white-space: pre-wrap;
}
.status-message.show { display: block; }
.status-message.info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.status-message.success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.status-message.error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* Sheet / modal */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}
.sheet-backdrop.open { display: flex; }

.sheet {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border-radius: 24px 24px 20px 20px;
    padding: 8px 0 0;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
    border: 1px solid #E5E7EB;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 2px;
    margin: 8px auto 0;
}
.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
}
.sheet-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1A1F36;
}
.sheet-close {
    width: 32px;
    height: 32px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    color: #6B7280;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.sheet-close:hover { background: #E5E7EB; }

.token-list {
    overflow-y: auto;
    padding: 4px 8px 20px;
}
.token-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.token-item:hover { background: #F3F4F6; }
.token-item.selected { background: #EFF6FF; }
.token-item .token-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
}
.token-item .token-sym { font-size: 15px; }
.token-item .token-nm  { font-size: 12px; }
.token-check {
    color: #3375BB;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}