* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: #f6f7f9;
    color: #1f2937;
}


/* ==========================
   TOP BAR
========================== */

.topbar {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;

    padding: 0 28px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}


.brand-icon {
    width: 40px;
    height: 40px;

    border-radius: 10px;

    background: #2563eb;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
}


.brand h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}


.brand span {
    font-size: 11px;
    color: #9ca3af;
}


/* ==========================
   MAIN
========================== */

.main-container {
    width: 100%;
    max-width: 1500px;

    margin: auto;

    padding: 20px 25px 50px;
}


/* ==========================
   REQUEST TAB BAR
========================== */

.request-tabs-bar {
    display: flex;
    align-items: flex-end;

    width: 100%;

    border-bottom: 1px solid #e5e7eb;
}


.request-tabs {
    display: flex;
    align-items: flex-end;

    overflow-x: auto;
    overflow-y: hidden;

    max-width: calc(100% - 130px);
}


.request-tabs::-webkit-scrollbar {
    height: 4px;
}


.request-tabs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}


.request-tab {
    min-width: 190px;
    max-width: 230px;
    height: 43px;

    background: #f3f4f6;

    border: 1px solid #e5e7eb;
    border-bottom: none;

    border-radius: 7px 7px 0 0;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 0 10px;

    font-size: 12px;

    cursor: pointer;
}


.request-tab.active {
    background: #ffffff;
    border-top: 2px solid #2563eb;
}


.request-tab-title {
    flex: 1;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.method-small {
    font-size: 9px;
    font-weight: 800;
}


.method-get {
    color: #16a34a;
}


.method-post {
    color: #f59e0b;
}


.method-put {
    color: #2563eb;
}


.method-patch {
    color: #7c3aed;
}


.method-delete {
    color: #dc2626;
}


.tab-close {
    width: 23px;
    height: 23px;

    border: none;

    background: transparent;

    color: #9ca3af;

    border-radius: 5px;

    cursor: pointer;

    font-size: 17px;
}


.tab-close:hover {
    background: #fee2e2;
    color: #dc2626;
}


.new-tab-btn {
    width: 42px;
    height: 42px;

    border: none;

    background: transparent;

    font-size: 25px;

    color: #4b5563;

    cursor: pointer;
}


.new-tab-btn:hover {
    color: #2563eb;
}


.history-toggle-btn {
    height: 32px;

    margin: 0 0 5px 5px;

    padding: 0 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #ffffff;

    color: #374151;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}


.history-toggle-btn:hover,
.history-toggle-btn.active {
    border-color: #2563eb;
    color: #2563eb;
}


/* ==========================
   HISTORY
========================== */

.history-panel {
    display: none;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-top: none;

    max-height: 340px;

    overflow: hidden;
}


.history-panel.show {
    display: block;
}


.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 13px 15px;

    border-bottom: 1px solid #e5e7eb;
}


.history-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.history-header strong {
    font-size: 13px;
}


.history-header span {
    font-size: 10px;
    color: #9ca3af;
}


.history-header button {
    padding: 6px 9px;

    border: 1px solid #fecaca;
    border-radius: 5px;

    background: #ffffff;

    color: #dc2626;

    font-size: 10px;

    cursor: pointer;
}


.history-list {
    max-height: 280px;
    overflow-y: auto;
}


.history-empty {
    padding: 25px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


.history-item {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px 14px;

    border-bottom: 1px solid #f3f4f6;

    cursor: pointer;
}


.history-item:hover {
    background: #f9fafb;
}


.history-method {
    min-width: 48px;

    font-size: 10px;
    font-weight: 800;
}


.history-url {
    flex: 1;

    font-family: Consolas, Monaco, monospace;

    font-size: 11px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.history-time {
    font-size: 10px;
    color: #9ca3af;
}


.history-delete {
    border: none;

    background: transparent;

    color: #9ca3af;

    font-size: 17px;

    cursor: pointer;
}


.history-delete:hover {
    color: #dc2626;
}


/* ==========================
   CARDS
========================== */

.request-card,
.response-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    overflow: hidden;
}


.request-card {
    border-radius: 0 8px 8px 8px;
}


.response-card {
    margin-top: 18px;

    border-radius: 8px;
}


/* ==========================
   URL BAR
========================== */

.request-url-row {
    display: flex;

    gap: 9px;

    padding: 18px;
}


.method-select {
    width: 120px;
    height: 46px;

    padding: 0 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #ffffff;

    font-weight: 700;

    outline: none;

    cursor: pointer;
}


.url-input {
    flex: 1;

    height: 46px;

    padding: 0 15px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    outline: none;

    font-size: 14px;
}


.url-input:focus {
    border-color: #2563eb;

    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}


.send-button {
    width: 105px;
    height: 46px;

    border: none;
    border-radius: 6px;

    background: #2563eb;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


.send-button:hover {
    background: #1d4ed8;
}


.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ==========================
   OPTION TABS
========================== */

.option-tabs {
    display: flex;

    padding-left: 18px;

    border-bottom: 1px solid #e5e7eb;

    overflow-x: auto;
}


.option-tab {
    padding: 14px 17px;

    border: none;
    border-bottom: 2px solid transparent;

    background: transparent;

    color: #6b7280;

    font-size: 13px;

    white-space: nowrap;

    cursor: pointer;
}


.option-tab:hover {
    color: #111827;
}


.option-tab.active {
    border-bottom-color: #2563eb;

    color: #2563eb;

    font-weight: 600;
}


/* ==========================
   PANELS
========================== */

.tab-panel {
    display: none;

    min-height: 230px;

    padding: 22px;
}


.tab-panel.active {
    display: block;
}


.panel-title {
    margin-bottom: 15px;

    font-size: 14px;
    font-weight: 600;
}


/* ==========================
   PARAM / HEADER TABLE
========================== */

.key-value-table {
    max-width: 1000px;

    border: 1px solid #e5e7eb;
    border-radius: 5px;

    overflow: hidden;
}


.table-head,
.key-value-row {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        45px;
}


.table-head {
    background: #f9fafb;

    border-bottom: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 11px;
    font-weight: 600;
}


.table-head div {
    padding: 10px 12px;

    border-right: 1px solid #e5e7eb;
}


.key-value-row {
    border-bottom: 1px solid #e5e7eb;
}


.key-value-row:last-child {
    border-bottom: none;
}


.key-value-row input {
    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: none;
    border-right: 1px solid #e5e7eb;

    outline: none;

    font-size: 13px;
}


.key-value-row input:focus {
    background: #f9fafb;
}


.remove-row {
    border: none;

    background: #ffffff;

    color: #9ca3af;

    cursor: pointer;

    font-size: 20px;
}


.remove-row:hover {
    background: #fef2f2;
    color: #ef4444;
}


.add-row-button {
    margin-top: 12px;

    padding: 8px 13px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: #ffffff;

    color: #374151;

    font-size: 12px;

    cursor: pointer;
}


.add-row-button:hover {
    border-color: #2563eb;
    color: #2563eb;
}


/* ==========================
   AUTHORIZATION
========================== */

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
}


.auth-row {
    width: 100%;

    display: flex;
    align-items: flex-start;

    gap: 14px;
}


.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;
    font-weight: 600;

    color: #111827;
}


/* ==========================
   AUTH TYPE
========================== */

.auth-type-group {
    width: 240px;
    min-width: 240px;

    margin-bottom: 0;
}


.auth-type-group select {
    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: #ffffff;

    outline: none;

    color: #111827;

    font-size: 13px;

    cursor: pointer;
}


.auth-type-group select:hover {
    border-color: #9ca3af;
}


.auth-type-group select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 2px
        rgba(37, 99, 235, 0.07);
}


/* ==========================
   BEARER TOKEN
========================== */

.bearer-token-box {
    display: none;

    flex: 1;

    min-width: 0;

    margin-bottom: 0;
}


.bearer-token-input {
    width: 100%;
    height: 43px;

    padding: 0 13px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: #ffffff;

    outline: none;

    color: #111827;

    font-family:
        Consolas,
        Monaco,
        monospace;

    font-size: 12px;
}


.bearer-token-input:hover {
    border-color: #9ca3af;
}


.bearer-token-input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 2px
        rgba(37, 99, 235, 0.07);
}


.bearer-token-input::placeholder {
    color: #9ca3af;
}


.security-note {
    margin-top: 6px;

    color: #9ca3af;

    font-size: 10px;
}


/* ==========================
   BODY
========================== */

.body-types {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 25px;

    margin-bottom: 17px;
}


.body-types label {
    display: flex;
    align-items: center;

    gap: 5px;

    font-size: 13px;

    cursor: pointer;
}


.body-editor {
    display: none;

    width: 100%;
    min-height: 260px;

    padding: 15px;

    border: none;
    border-radius: 6px;

    background: #111827;
    color: #f9fafb;

    outline: none;

    resize: vertical;

    font-family: Consolas, Monaco, monospace;

    font-size: 13px;
    line-height: 1.6;
}


/* ==========================
   FORM DATA
========================== */

.form-data-box {
    display: none;
}


.form-data-table {
    width: 100%;
    max-width: 1100px;

    border: 1px solid #e5e7eb;
    border-radius: 5px;

    overflow: hidden;
}


.form-data-head,
.form-data-row {
    display: grid;

    grid-template-columns:
        130px
        1fr
        1.4fr
        45px;
}


.form-data-head {
    background: #f9fafb;

    border-bottom: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 11px;
    font-weight: 600;
}


.form-data-head div {
    padding: 10px 12px;

    border-right: 1px solid #e5e7eb;
}


.form-data-row {
    border-bottom: 1px solid #e5e7eb;
}


.form-data-row:last-child {
    border-bottom: none;
}


.form-data-row select,
.form-data-row input {
    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: none;
    border-right: 1px solid #e5e7eb;

    background: #ffffff;

    outline: none;

    font-size: 13px;
}


.form-data-value-wrapper {
    position: relative;

    width: 100%;

    overflow: hidden;
}


.form-data-value-wrapper input[type="file"] {
    height: auto;

    min-height: 43px;

    padding: 9px 12px;
}


.saved-file-names {
    padding: 5px 10px 7px;

    background: #f9fafb;

    border-top: 1px solid #f3f4f6;

    color: #6b7280;

    font-size: 10px;

    word-break: break-word;
}


.saved-file-names.reselect {
    color: #d97706;
}


/* ==========================
   RESPONSE TOP
========================== */

.response-top {
    min-height: 55px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid #e5e7eb;
}


.response-title {
    font-size: 14px;
}


.response-info {
    display: flex;
    align-items: center;

    gap: 22px;

    color: #6b7280;

    font-size: 12px;
}


.response-info strong {
    color: #111827;
}


/* ==========================
   RESPONSE TOOLBAR
========================== */

.response-toolbar {
    min-height: 43px;

    display: flex;
    align-items: center;

    padding: 0 15px;

    border-bottom: 1px solid #e5e7eb;
}


.response-tabs {
    display: flex;
}


.response-tab {
    height: 43px;

    padding: 0 14px;

    border: none;
    border-bottom: 2px solid transparent;

    background: transparent;

    color: #6b7280;

    font-size: 12px;

    cursor: pointer;
}


.response-tab.active {
    border-bottom-color: #2563eb;

    color: #2563eb;
}


.response-actions {
    margin-left: auto;

    display: flex;

    gap: 8px;
}


.response-actions button {
    padding: 6px 11px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: #ffffff;

    font-size: 11px;

    cursor: pointer;
}


.response-actions button:hover {
    border-color: #2563eb;
    color: #2563eb;
}


/* ==========================
   RESPONSE OUTPUT
========================== */

.response-output {
    min-height: 350px;
    max-height: 650px;

    overflow: auto;

    padding: 20px;

    background: #111827;
    color: #e5e7eb;

    font-family: Consolas, Monaco, monospace;

    font-size: 13px;
    line-height: 1.6;
}


.response-output::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}


.response-output::-webkit-scrollbar-thumb {
    background: #374151;

    border-radius: 10px;
}


.response-output::-webkit-scrollbar-track {
    background: #111827;
}


.response-placeholder {
    color: #6b7280;
}


.response-plain {
    margin: 0;

    white-space: pre-wrap;
    word-break: break-word;

    font: inherit;
}


/* ==========================
   JSON TREE
========================== */

.json-tree {
    min-width: max-content;
}


.json-node {
    font-family: Consolas, Monaco, monospace;
}


.json-line {
    min-height: 22px;

    display: flex;
    align-items: baseline;

    white-space: nowrap;
}


.json-toggle {
    width: 20px;
    min-width: 20px;

    padding: 0;

    border: none;

    background: transparent;

    color: #9ca3af;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}


.json-toggle:hover {
    color: #ffffff;
}


.json-spacer {
    display: inline-block;

    width: 20px;
    min-width: 20px;
}


.json-key {
    margin-right: 6px;

    color: #93c5fd;
}


.json-key.array-key {
    color: #9ca3af;
}


.json-colon {
    margin-right: 6px;

    color: #9ca3af;
}


.json-bracket {
    color: #f9fafb;
}


.json-meta {
    margin-left: 8px;

    color: #6b7280;

    font-size: 10px;
}


.json-collapsed-preview {
    display: none;

    margin-left: 5px;

    color: #9ca3af;
}


.json-children {
    margin-left: 9px;
    padding-left: 13px;

    border-left: 1px solid #374151;
}


.json-closing {
    padding-left: 20px;

    color: #f9fafb;
}


.json-branch.collapsed > .json-children,
.json-branch.collapsed > .json-closing {
    display: none;
}


.json-branch.collapsed > .json-line .json-collapsed-preview {
    display: inline;
}


.json-string {
    color: #86efac;
}


.json-number {
    color: #fca5a5;
}


.json-boolean {
    color: #fde68a;
}


.json-null {
    color: #c4b5fd;
}


/* ==========================
   AUTH RESPONSIVE
========================== */

@media (max-width: 700px) {

    .auth-row {
        flex-direction: column;

        gap: 15px;
    }


    .auth-type-group {
        width: 100%;
        min-width: 100%;
    }


    .bearer-token-box {
        width: 100%;
    }

}


/* ==========================
   TABLET
========================== */

@media (max-width: 900px) {

    .main-container {
        padding: 15px;
    }


    .request-tabs {
        max-width: calc(100% - 110px);
    }


    .history-toggle-btn {
        font-size: 0;

        width: 38px;
        padding: 0;
    }


    .history-toggle-btn::after {
        content: "H";

        font-size: 11px;
    }


    .request-url-row {
        flex-wrap: wrap;
    }


    .method-select {
        width: 110px;
    }


    .url-input {
        flex: unset;

        width: calc(100% - 120px);
    }


    .send-button {
        width: 100%;
    }


    .response-top {
        flex-direction: column;
        align-items: flex-start;

        gap: 10px;

        padding: 15px 18px;
    }


    .response-info {
        flex-wrap: wrap;
    }


    .form-data-head,
    .form-data-row {
        grid-template-columns:
            90px
            1fr
            1.2fr
            40px;
    }

}


/* ==========================
   MOBILE
========================== */

@media (max-width: 600px) {

    .topbar {
        padding: 0 15px;
    }


    .main-container {
        padding: 12px 10px 40px;
    }


    .request-tab {
        min-width: 165px;
    }


    .request-url-row {
        padding: 12px;
    }


    .method-select,
    .url-input,
    .send-button {
        width: 100%;
    }


    .option-tabs {
        padding-left: 5px;
    }


    .tab-panel {
        padding: 15px;
    }


    .table-head,
    .key-value-row {
        grid-template-columns:
            1fr
            1fr
            40px;
    }


    .form-data-table {
        overflow-x: auto;
    }


    .form-data-head,
    .form-data-row {
        min-width: 650px;
    }


    .response-toolbar {
        align-items: flex-start;
        flex-direction: column;

        padding: 0 10px 8px;
    }


    .response-actions {
        margin-left: 0;

        flex-wrap: wrap;
    }


    .response-output {
        padding: 14px;

        font-size: 12px;
    }

}