@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7f6;
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 98vh;
    margin: 1vh auto;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-window {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #e6e6e6;
    padding: 1rem;
}

/* MESSAGES */
.message-bot {
    background-color: #ffffff;
    border-radius: 12px 12px 12px 4px;
    max-width: 85%;
    padding: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    align-self: flex-start;
}

.message-user {
    background-color: #3b82f6;
    color: white;
    border-radius: 12px 12px 4px 12px;
    max-width: 85%;
    padding: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    align-self: flex-end;
}

.message-blocked {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: #fff !important;
    border: 2px solid #7f1d1d !important;
    box-shadow: 0 4px 20px rgba(220,38,38,0.4) !important;
    animation: shakeBlocked 0.5s ease-in-out;
}
.message-blocked * { color: #fff !important; }

@keyframes shakeBlocked {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* INLINE KEYBOARD */
.inline-keyboard button {
    background-color: #55a8f4;
    color: white;
    padding: 8px 12px;
    margin: 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
    flex-grow: 1;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.inline-keyboard button:hover { background-color: #3b82f6; }
.inline-keyboard button:disabled { opacity: 0.5; cursor: not-allowed; }
.inline-keyboard button[data-callback="action_menu"] {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}
.inline-keyboard button[data-callback="action_menu"]:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}
.inline-keyboard button[data-callback="action_menu"]:disabled {
    opacity: 1; cursor: pointer;
}
.inline-keyboard button[data-callback^="check_topup"] {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}
.inline-keyboard button[data-callback^="check_topup"]:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
}
.inline-keyboard button[data-url*="wa.me"] {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
}
.inline-keyboard button[data-url*="wa.me"]:hover {
    background: linear-gradient(135deg, #128C7E, #075E54) !important;
}
.inline-keyboard button[data-callback^="qris_pending_show"] {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}
.inline-keyboard button[data-callback^="qris_pending_show"]:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
}

/* REPLY KEYBOARD */
.reply-keyboard {
    background-color: #ffffff;
    border-top: 1px solid #d1d5db;
    padding: 0.5rem;
    z-index: 10;
}
.reply-keyboard button {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #1f2937;
    padding: 10px 14px;
    margin: 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
    width: 100%;
    text-align: center;
    cursor: pointer;
}
.reply-keyboard button:hover { background-color: #e5e7eb; }
.reply-keyboard .btn-row { display: flex; gap: 4px; margin-bottom: 4px; }

/* MARKDOWN */
.message-bot strong, .message-bot * { font-weight: 600; }
.message-bot em, .message-bot i { font-style: italic; }
.message-bot code {
    background-color: #f0f4f8;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
}

/* FLOATING NAV */
.floating-nav {
    position: absolute;
    right: 14px;
    top: 80px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    transition: opacity 0.3s;
}
.floating-nav.hidden-nav { opacity: 0; pointer-events: none; }
.floating-nav-toggle {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    transition: all 0.25s;
    font-size: 20px;
    user-select: none;
    border: none;
}
.floating-nav-toggle:hover { transform: scale(1.1); }
.floating-nav-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.35s ease, opacity 0.3s, transform 0.3s;
    transform-origin: top right;
}
.floating-nav-items.collapsed {
    max-height: 0; opacity: 0; pointer-events: none; transform: scale(0.9);
}
.floating-nav-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: white;
    color: #3b82f6;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #e5e7eb;
    font-size: 20px;
    transition: all 0.2s;
    position: relative;
}
.floating-nav-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.12) translateX(-3px);
    border-color: #3b82f6;
}
.floating-nav-btn .tooltip {
    position: absolute;
    right: 60px;
    background: #1f2937;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    font-weight: 600;
}
.floating-nav-btn:hover .tooltip { opacity: 1; }
.floating-nav-btn.color-danger { color: #ef4444; }
.floating-nav-btn.color-danger:hover { background: #ef4444; border-color: #ef4444; }
.floating-nav-btn.color-success { color: #10b981; }
.floating-nav-btn.color-success:hover { background: #10b981; border-color: #10b981; }
.floating-nav-btn.color-purple { color: #8b5cf6; }
.floating-nav-btn.color-purple:hover { background: #8b5cf6; border-color: #8b5cf6; }

/* HISTORY MODAL */
.history-modal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
    backdrop-filter: blur(3px);
}
.history-modal.show { display: flex; }
.history-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.history-modal-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-modal-body { overflow-y: auto; flex-grow: 1; padding: 8px; }
.history-item {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
}
.history-item:hover { background: #eff6ff; }
.history-item:last-child { border-bottom: none; }
.history-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.history-item-title { font-weight: 700; font-size: 13px; color: #1f2937; flex: 1; }
.history-item-meta { font-size: 11px; color: #6b7280; }
/* SN di history */
.history-item-sn {
    font-size: 11px;
    color: #1f2937;
    padding: 6px 8px;
    background: #f0fdf4;
    border-left: 3px solid #10b981;
    border-radius: 4px;
    margin-top: 4px;
    word-break: break-all;
}
.history-item-sn code {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.history-item-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: #6b7280; }
.history-badge { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.badge-sukses { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-gagal { background: #fee2e2; color: #991b1b; }

/* TOAST */
.copy-toast {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 300;
    font-weight: 600;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* QR MODAL */
.qr-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.qr-modal.show { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.qr-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.qr-modal-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}
.qr-modal-body { padding: 20px; }
.qr-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 13px;
}
.qr-info-row:last-child { border-bottom: none; }
.qr-info-label { color: #6b7280; }
.qr-info-value { font-weight: 700; color: #1f2937; }
.qr-info-value.amount { color: #dc2626; font-size: 16px; }
.qr-image-wrap {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}
.qr-image-wrap img { width: 260px; height: 260px; display: block; }
.qr-important {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
    margin-bottom: 14px;
}
.qr-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}
.qr-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}
.qr-btn-primary:hover { opacity: 0.9; }
.qr-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}
.qr-btn-secondary:hover { background: #e5e7eb; }

/* RESPONSIVE */
@media (max-width: 640px) {
    body { padding: 0; align-items: stretch; }
    .main-container { height: 100vh; max-width: 100vw; margin: 0; border-radius: 0; }
    .floating-nav { right: 10px; top: 70px; }
    .floating-nav-btn { width: 44px; height: 44px; font-size: 18px; }
    .floating-nav-toggle { width: 38px; height: 38px; font-size: 18px; }
    .qr-image-wrap img { width: 220px; height: 220px; }
}

/* =========================================================
   BONUS MODAL
   ========================================================= */
.bonus-modal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
    backdrop-filter: blur(3px);
}
.bonus-modal.show { display: flex; }

.bonus-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.25s ease;
}

.bonus-modal-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================================
   TAB
   ========================================================= */
.bonus-tab {
    display: flex;
    gap: 6px;
    padding: 10px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.bonus-tab-btn {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.bonus-tab-btn:hover { background: #f3f4f6; }
.bonus-tab-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

/* =========================================================
   DATE PICKER
   ========================================================= */
.bonus-date-wrap {
    padding: 14px 16px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-bottom: 1px solid #d1fae5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Preview tanggal terpilih */
.bonus-date-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}
.bonus-date-preview .icon { font-size: 18px; }

/* Input + tombol */
.bonus-date-input-wrap {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.bonus-date-input {
    flex: 1;
    padding: 12px 44px 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background-color: #ffffff;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.bonus-date-input:hover { border-color: #10b981; }
.bonus-date-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}

/* Fix tampilan date input */
.bonus-date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0; top: 0;
    width: 100%; height: 100%;
    cursor: pointer;
}
.bonus-date-input::-webkit-inner-spin-button,
.bonus-date-input::-webkit-clear-button { display: none; }

/* Tombol Tampilkan */
.bonus-date-btn {
    padding: 12px 20px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.bonus-date-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}
.bonus-date-btn:active { transform: translateY(0); }

/* Quick pick tanggal */
.bonus-date-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bonus-date-quick-btn {
    padding: 6px 12px;
    border: 1px solid #10b981;
    background: white;
    color: #059669;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.bonus-date-quick-btn:hover {
    background: #10b981;
    color: white;
}

/* =========================================================
   BODY - LIST BONUS
   ========================================================= */
.bonus-modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding: 8px;
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 8px;
    transition: background 0.15s;
}
.bonus-item:hover { background: #ecfdf5; }
.bonus-item:last-child { border-bottom: none; }

.bonus-item-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bonus-item-content {
    flex: 1;
    min-width: 0;
}
.bonus-item-title {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bonus-item-meta {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.bonus-item-amount {
    font-weight: 700;
    font-size: 13px;
    color: #059669;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================================
   FOOTER - TOTAL
   ========================================================= */
.bonus-modal-footer {
    padding: 14px 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-top: 2px solid #10b981;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.bonus-total-label {
    font-weight: 700;
    font-size: 13px;
    color: #065f46;
}
.bonus-total-value {
    font-weight: 800;
    font-size: 18px;
    color: #059669;
}
/* =========================================================
   LOGIN VIEW — CLEAN & MODERN
   ========================================================= */
:root {
    --ui-primary: #2a3bd6;
    --ui-primary-dark: #1e2478;
    --ui-primary-light: #eef2ff;
    --ui-text-main: #1f2937;
    --ui-text-muted: #6b7280;
    --ui-bg-page: #f3f4f6;
    --ui-bg-card: #ffffff;
    --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Full screen login */
.login-view {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--ui-bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.login-view * {
    box-sizing: border-box;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

/* CARD */
.ui-card {
    background: var(--ui-bg-card);
    border-radius: 16px;
    padding: 36px 28px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.4s ease;
}
@keyframes cardFadeIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Top gradient bar */
.ui-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--ui-primary), var(--ui-primary-dark));
}

/* LOGO */
.ui-logo {
    width: 64px;
    height: 64px;
    background: var(--ui-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--ui-primary);
    transition: transform 0.3s;
}
.ui-logo:hover {
    transform: scale(1.05) rotate(-5deg);
}

/* TITLE */
.ui-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ui-text-main);
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}
.ui-subtitle {
    font-size: 13px;
    color: var(--ui-text-muted);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* FORM GROUP */
.ui-form-group {
    margin-bottom: 18px;
    text-align: left;
}
.ui-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-text-main);
    margin-bottom: 8px;
}

/* INPUT */
.ui-input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--ui-primary-light);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--ui-text-main);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}
.ui-input:focus {
    border-color: var(--ui-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(42, 59, 214, 0.1);
}
.ui-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Password input wrap */
.ui-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ui-input-wrap .ui-input {
    padding-right: 46px;
}
.ui-toggle-pass {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--ui-text-muted);
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.ui-toggle-pass:hover {
    opacity: 1;
    background: rgba(42, 59, 214, 0.05);
}

/* BUTTON */
.ui-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}
.ui-btn-primary {
    background: var(--ui-primary);
    color: white;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(42, 59, 214, 0.3);
}
.ui-btn-primary:hover:not(:disabled) {
    background: var(--ui-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(42, 59, 214, 0.4);
}
.ui-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.ui-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ALERT / ERROR */
.ui-alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    text-align: left;
    line-height: 1.4;
    animation: shakeAlert 0.4s ease-in-out;
}
.ui-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}
@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* FOOTER */
.ui-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: var(--ui-text-muted);
}

/* CHAT VIEW DEFAULT STATE */
.chat-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}
.chat-view.hidden {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .login-view {
        padding: 16px;
    }
    .ui-card {
        padding: 28px 22px 22px;
        border-radius: 14px;
    }
    .ui-logo {
        width: 56px;
        height: 56px;
    }
    .ui-title {
        font-size: 22px;
    }
    .ui-input {
        padding: 13px 14px;
        font-size: 14px;
    }
    .ui-btn {
        padding: 13px;
        font-size: 14px;
    }
}