/* Shadcn UI Design System for Bybit P2P Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --background: #09090b;       /* Zinc 950 */
    --foreground: #fafafa;       /* Zinc 50 */
    --card: #18181b;             /* Zinc 900 */
    --card-foreground: #fafafa;
    --popover: #09090b;
    --popover-foreground: #fafafa;
    --primary: #f59e0b;          /* Bybit Amber */
    --primary-foreground: #09090b;
    --secondary: #27272a;        /* Zinc 800 */
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;  /* Zinc 400 */
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --destructive: #ef4444;      /* Rose 500 */
    --destructive-foreground: #fafafa;
    --border: #27272a;           /* Zinc 800 */
    --border-subtle: #1e1e24;
    --input: #27272a;
    --ring: #71717a;
    --radius: 0.5rem;            /* 8px */

    --color-buy: #10b981;
    --color-sell: #f43f5e;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Shadcn Minimalist Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Shadcn Card */
.dash-card, .shadcn-card {
    background-color: rgba(24, 24, 27, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dash-card:hover, .shadcn-card:hover {
    border-color: #3f3f46;
}

/* Shadcn Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #09090b;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
}
.btn-primary:hover {
    background-color: #d97706;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.btn-secondary:hover {
    background-color: #3f3f46;
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: #e4e4e7;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.btn-outline:hover {
    background-color: var(--secondary);
    color: #ffffff;
    border-color: #3f3f46;
}

.btn-buy {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.btn-buy:hover {
    background-color: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    color: #ffffff;
}

.btn-sell {
    background-color: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.btn-sell:hover {
    background-color: rgba(244, 63, 94, 0.25);
    border-color: rgba(244, 63, 94, 0.5);
    color: #ffffff;
}

/* Shadcn Badges */
.badge-buy {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    padding: 2px 8px;
    font-weight: 600;
}

.badge-sell {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 9999px;
    padding: 2px 8px;
    font-weight: 600;
}

.badge-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 9999px;
    padding: 2px 8px;
    font-weight: 600;
}

/* Shadcn Form Inputs */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    background-color: rgba(9, 9, 11, 0.7);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #71717a;
    outline: none;
    box-shadow: 0 0 0 1px #71717a;
}

/* Sidebar Navigation (Shadcn style) */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.sidebar-link:hover {
    background-color: var(--secondary);
    color: var(--foreground);
}
.sidebar-link.active {
    background-color: #18181b;
    color: var(--foreground);
    font-weight: 600;
    border-color: var(--border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.sidebar-link.active i {
    color: var(--primary);
}

/* Dialog / Modal (Shadcn Backdrop) */
.modal-overlay {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInPage 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toast (Shadcn Sonner / Radix Toast style) */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}

.toast {
    background-color: #09090b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fafafa;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    animation: toastSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
    from { transform: translateY(10px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Live Chat P2P Components */
.chat-order-card {
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}
.chat-order-card:hover {
    background-color: rgba(39, 39, 42, 0.5);
}
.chat-order-card.active {
    background-color: #18181b;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.chat-filter-btn {
    transition: all 0.15s ease;
}
.chat-filter-btn.active {
    background-color: #27272a;
    color: #fafafa;
    border-color: #3f3f46;
}

.chat-bubble-me {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px 12px 2px 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.chat-bubble-other {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 12px 12px 12px 2px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Shadcn Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
table th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    background-color: rgba(24, 24, 27, 0.6);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}
table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(39, 39, 42, 0.6);
    color: var(--foreground);
    font-size: 0.75rem;
}
table tbody tr {
    transition: background-color 0.12s ease;
}
table tbody tr:hover {
    background-color: rgba(39, 39, 42, 0.25);
}
table tbody tr:last-child td {
    border-bottom: none;
}

/* Shadcn Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 9999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1rem;
    white-space: nowrap;
}
.badge-default {
    background-color: #27272a;
    color: #e4e4e7;
    border: 1px solid #3f3f46;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-destructive {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

