@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Code+Latin:wght@400;500;600;700&family=Phudu:wght@500;600;700;800;900&display=swap');

*, *::before, *::after {
    border-radius: 0 !important;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* VS CODE DARK MODERN FOUNDATION */
    --bg-page: #1e1e1e;
    --bg-sidebar: #181818;
    --bg-surface: #252526;
    --bg-surface-elevated: #2d2d2d;
    --bg-input: #1f1f1f;
    --border: #333333;
    --border-subtle: #2d2d2d;
    --border-hover: #454545;

    /* VS CODE SYNTAX HIGHLIGHT PALETTE */
    --vs-blue: #569cd6;      /* Keyword / Method / Links */
    --vs-sky: #4fc1ff;       /* Variable / Type definition */
    --vs-yellow: #dcdcaa;    /* Function / Warning / Time */
    --vs-amber: #e5c07b;     /* Constant / Highlight */
    --vs-green: #6a9955;     /* Comments / Active */
    --vs-emerald: #4ec9b0;   /* Class / Interface / Success */
    --vs-orange: #ce9178;    /* String / Param / Numeric */
    --vs-purple: #c586c0;    /* Control Flow / Roles */
    --vs-red: #f44747;       /* Error / Danger */
    --vs-pink: #d16969;      /* Special regex */
    --vs-gray: #858585;      /* Secondary text */

    --accent: #4ec9b0;       /* VS Code Emerald Type */
    --accent-hover: #38bdf8;
    --text-primary: #d4d4d4;
    --text-secondary: #9cdcfe;
    --text-muted: #858585;
    --danger: #f44747;
    --warning: #e5c07b;

    --font-heading: 'Phudu', sans-serif;
    --font-code: 'M PLUS Code Latin', 'Courier New', monospace, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-code);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-phudu, h1, h2, h3, h4, th, .btn, .nav-link, .title-phudu {
    font-family: var(--font-heading) !important;
    letter-spacing: -0.01em;
}

.font-mono-code, p, li, span, input, textarea, select, label, td, pre, code {
    font-family: var(--font-code) !important;
}

/* CHATGPT & VS CODE DARK SCROLLBAR */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #181818;
}
::-webkit-scrollbar-thumb {
    background: #333333;
}
::-webkit-scrollbar-thumb:hover {
    background: #4ec9b0;
}

/* CARDS */
.chatgpt-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.chatgpt-card:hover {
    border-color: #4a4a4a;
}

/* INPUT CONTROLS */
.chatgpt-input, select, input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"], textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: #ffffff;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-code);
    transition: all 0.2s ease;
}
.chatgpt-input:focus, select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: #262626;
    box-shadow: 0 0 0 1px var(--accent);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: #0e639c;
    color: #ffffff;
    border-color: #1177bb;
}
.btn-primary:hover {
    background-color: #1177bb;
    border-color: #4fc1ff;
    color: #ffffff;
}

.btn-secondary {
    background-color: #2d2d2d;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background-color: #383838;
    border-color: #4fc1ff;
    color: #ffffff;
}

.btn-danger {
    background-color: #4a1818;
    color: #fca5a5;
    border-color: #7f1d1d;
}
.btn-danger:hover {
    background-color: #f44747;
    color: #000000;
    border-color: #f44747;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* SIDEBAR NAVIGATION */
.sidebar-btn, .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
    color: #b4b4b4;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
}
.sidebar-btn:hover, .nav-link:hover {
    background-color: #252525;
    color: #ffffff;
}
.sidebar-btn.active, .nav-link.active {
    background-color: #2d2d2d;
    color: #ffffff;
    border-left-color: var(--accent);
    font-weight: 700;
}

/* STATUS PILLS */
.zalo-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: #181818;
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-family: var(--font-code);
    color: #4ec9b0;
}
.zalo-status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #4ec9b0;
    display: inline-block;
}
.zalo-status-pill.offline {
    color: #e5c07b;
}
.zalo-status-pill.offline::before {
    background-color: #e5c07b;
}

/* VS CODE SYNTAX BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-family: var(--font-code);
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
}
.badge-success, .badge-active {
    background-color: rgba(78, 201, 176, 0.15);
    color: #4ec9b0;
    border-color: rgba(78, 201, 176, 0.4);
}
.badge-failed {
    background-color: rgba(244, 71, 71, 0.15);
    color: #f87171;
    border-color: rgba(244, 71, 71, 0.4);
}
.badge-paused {
    background-color: rgba(229, 192, 123, 0.15);
    color: #e5c07b;
    border-color: rgba(229, 192, 123, 0.4);
}
.badge-cyan {
    background-color: rgba(79, 193, 255, 0.15);
    color: #4fc1ff;
    border-color: rgba(79, 193, 255, 0.4);
}
.badge-purple {
    background-color: rgba(197, 134, 192, 0.15);
    color: #c586c0;
    border-color: rgba(197, 134, 192, 0.4);
}
.badge-neutral {
    background-color: rgba(86, 156, 214, 0.15);
    color: #9cdcfe;
    border-color: rgba(86, 156, 214, 0.3);
}

/* TABLES (VS CODE EDITOR THEME) */
.chatgpt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.chatgpt-table th {
    background-color: #181818;
    color: #9cdcfe;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}
.chatgpt-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #2d2d2d;
    background-color: #252526;
    color: #d4d4d4;
}
.chatgpt-table tr:hover td {
    background-color: #2c2c2d;
}
.chatgpt-table td strong {
    color: #ffffff;
}
.chatgpt-table td code {
    background-color: #1a1a1a;
    color: #ce9178;
    padding: 2px 5px;
    font-size: 0.7rem;
    border: 1px solid #333333;
}

/* VIEW PANELS */
.view-panel {
    display: none;
}
.view-panel.active {
    display: block;
}

/* MODALS */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(2px);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background-color: #252526;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body {
    padding: 1rem;
    overflow-y: auto;
}
.modal-footer {
    background-color: #1e1e1e;
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* TOAST */
.toast-box {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background-color: #181818;
    border: 1px solid var(--accent);
    color: #ffffff;
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast.error {
    border-color: var(--danger);
    color: #fca5a5;
}

/* CHIPS */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.45rem;
    background-color: #1f1f1f;
    border: 1px solid var(--border);
    font-size: 0.7rem;
    color: #e5e5e5;
}

/* MODAL ON MOBILE */
@media (max-width: 767px) {
    .modal-box {
        max-width: 96% !important;
        margin: 0.5rem !important;
        max-height: 94vh !important;
    }
}

