/* =========================================================
   EXACTSUB DEVELOPER PORTAL
   Complete Responsive Stylesheet
   ========================================================= */


/* =========================================================
   BRAND VARIABLES
   ========================================================= */

:root {
    --exact-blue: #022A7B;
    --exact-dark-blue: #011E59;
    --exact-green: #29BA22;

    --page-bg: #f5f7fb;
    --card-bg: #ffffff;

    --text-primary: #14213d;
    --text-secondary: #64748b;
    --text-muted: #8a96a8;

    --border: #e7ebf2;
    --border-dark: #d8dee8;

    --success-bg: #effaf0;
    --success-border: #cceccc;
    --success-text: #18831a;

    --danger: #dc3545;
    --danger-bg: #fff4f5;
    --danger-border: #f2c8cd;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 25px rgba(15, 23, 42, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}


/* =========================================================
   PAGE WRAPPER
   ========================================================= */

.developer-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    padding: 36px 38px 60px;

    background: var(--page-bg);

    color: var(--text-primary);

    overflow-x: hidden;
}


/* =========================================================
   HERO
   ========================================================= */

.developer-hero {
    width: 100%;
    box-sizing: border-box;

    margin-bottom: 24px;
}

.developer-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    width: 100%;
    max-width: 1100px;
}

.developer-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(2, 42, 123, 0.08);

    border-radius: 12px;

    color: var(--exact-blue);

    font-size: 20px;
}

.developer-eyebrow {
    display: block;

    margin-bottom: 7px;

    color: var(--exact-blue);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.developer-hero h1 {
    margin: 0 0 8px;

    color: var(--text-primary);

    font-size: clamp(32px, 3vw, 44px);
    line-height: 1.1;

    font-weight: 750;

    letter-spacing: -1.2px;
}

.developer-hero p {
    margin: 0;

    max-width: 800px;

    color: var(--text-secondary);

    font-size: 15px;
    line-height: 1.65;
}


/* =========================================================
   SECURITY NOTICE
   ========================================================= */

.security-notice {
    width: 100%;
    box-sizing: border-box;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 16px 18px;

    margin-bottom: 24px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-left: 4px solid var(--exact-blue);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.security-notice-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(2, 42, 123, 0.08);

    border-radius: 9px;

    color: var(--exact-blue);

    font-size: 15px;
}

.security-notice-content {
    min-width: 0;
}

.security-notice strong {
    display: block;

    margin-bottom: 3px;

    color: var(--text-primary);

    font-size: 14px;
    font-weight: 700;
}

.security-notice p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   MAIN TWO-COLUMN GRID
   ========================================================= */

.developer-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 22px;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto 22px;

    box-sizing: border-box;
}


/* =========================================================
   GENERIC CARD
   ========================================================= */

.developer-card {
    min-width: 0;

    box-sizing: border-box;

    background: var(--card-bg);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 26px;

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}

.developer-card:hover {
    box-shadow: var(--shadow-md);
}


/* =========================================================
   CARD HEADING
   ========================================================= */

.card-heading {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    margin-bottom: 22px;

    min-width: 0;
}

.heading-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-size: 15px;
}

.api-icon {
    color: var(--exact-blue);
    background: rgba(2, 42, 123, 0.08);
}

.docs-icon {
    color: var(--exact-green);
    background: rgba(41, 186, 34, 0.10);
}

.quick-icon {
    color: var(--exact-blue);
    background: rgba(2, 42, 123, 0.08);
}

.card-heading > div:last-child {
    min-width: 0;
}

.section-label {
    display: block;

    margin-bottom: 4px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-heading h2 {
    margin: 0 0 5px;

    color: var(--text-primary);

    font-size: 24px;
    line-height: 1.2;

    font-weight: 750;

    letter-spacing: -0.4px;
}

.card-heading p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   API STATUS
   ========================================================= */

.api-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 17px;

    padding: 7px 11px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}

.api-status.active {
    color: var(--success-text);

    background: var(--success-bg);

    border: 1px solid var(--success-border);
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--exact-green);
}


/* =========================================================
   API KEY BOX
   ========================================================= */

.api-key-box {
    width: 100%;

    box-sizing: border-box;

    margin-bottom: 17px;

    padding: 15px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;
}

.api-key-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 9px;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

.protected-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: var(--exact-green);

    font-size: 10px;
}

.api-key-value-row {
    display: flex;
    align-items: center;

    width: 100%;

    min-width: 0;

    gap: 8px;
}

.api-key-value-row code {
    display: block;

    flex: 1;

    min-width: 0;

    padding: 9px 10px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 7px;

    color: var(--exact-blue);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;

    line-height: 1.4;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   ICON ACTION BUTTON
   ========================================================= */

.icon-action {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border-dark);

    border-radius: 8px;

    background: #ffffff;

    color: var(--exact-blue);

    cursor: pointer;

    font-size: 13px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.icon-action:hover {
    background: rgba(2, 42, 123, 0.06);

    border-color: rgba(2, 42, 123, 0.25);
}


/* =========================================================
   API ACTIONS
   ========================================================= */

.api-actions {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin-bottom: 15px;
}

.api-actions form {
    margin: 0;
}


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.btn-primary-custom {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 16px;

    border: 1px solid var(--exact-blue);

    border-radius: 8px;

    background: var(--exact-blue);

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;
    font-weight: 650;

    line-height: 1;

    cursor: pointer;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.btn-primary-custom:hover {
    background: var(--exact-dark-blue);

    border-color: var(--exact-dark-blue);

    color: #ffffff;

    text-decoration: none;

    box-shadow: 0 4px 12px rgba(2, 42, 123, 0.18);
}

.btn-primary-custom:active {
    transform: translateY(1px);
}

.btn-primary-custom:disabled {
    opacity: 0.65;

    cursor: not-allowed;

    box-shadow: none;
}


/* =========================================================
   DANGER OUTLINE BUTTON
   ========================================================= */

.btn-danger-outline {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 15px;

    border: 1px solid var(--danger-border);

    border-radius: 8px;

    background: #ffffff;

    color: var(--danger);

    font-family: inherit;

    font-size: 13px;
    font-weight: 650;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn-danger-outline:hover {
    background: var(--danger-bg);

    border-color: var(--danger);

    color: var(--danger);
}

.btn-danger-outline:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* =========================================================
   API WARNING
   ========================================================= */

.api-warning {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    padding-top: 13px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.55;
}

.api-warning i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: #e09a00;
}


/* =========================================================
   API EMPTY STATE
   ========================================================= */

.api-empty {
    text-align: center;

    padding: 15px 5px 4px;
}

.empty-icon {
    width: 52px;
    height: 52px;

    margin: 0 auto 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(2, 42, 123, 0.07);

    border-radius: 12px;

    color: var(--exact-blue);

    font-size: 20px;
}

.api-empty h3 {
    margin: 0 0 7px;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 700;
}

.api-empty p {
    max-width: 420px;

    margin: 0 auto 18px;

    color: var(--text-secondary);

    font-size: 13px;

    line-height: 1.6;
}

.api-empty form {
    margin: 0;
}


/* =========================================================
   DOCUMENTATION
   ========================================================= */

.documentation-content {
    min-width: 0;
}

.documentation-description {
    margin-bottom: 20px;
}

.documentation-description p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;

    line-height: 1.65;
}


/* =========================================================
   DOCUMENTATION FEATURES
   ========================================================= */

.documentation-features {
    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-bottom: 21px;
}

.documentation-feature {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px 12px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 9px;
}

.feature-icon {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 7px;

    color: var(--exact-blue);

    font-size: 11px;
}

.documentation-feature > div:last-child {
    min-width: 0;
}

.documentation-feature strong {
    display: block;

    margin-bottom: 2px;

    color: var(--text-primary);

    font-size: 12px;
    font-weight: 700;
}

.documentation-feature span {
    display: block;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.4;
}


/* =========================================================
   DOCUMENTATION BUTTON
   ========================================================= */

.documentation-button {
    width: 100%;

    min-height: 44px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 0 15px;

    border: 1px solid rgba(2, 42, 123, 0.15);

    border-radius: 8px;

    background: rgba(2, 42, 123, 0.05);

    color: var(--exact-blue);

    font-size: 13px;
    font-weight: 650;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.documentation-button span {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    min-width: 0;
}

.documentation-button:hover {
    background: rgba(2, 42, 123, 0.09);

    border-color: rgba(2, 42, 123, 0.25);

    color: var(--exact-blue);

    text-decoration: none;
}

.documentation-button > i {
    flex: 0 0 auto;

    font-size: 11px;
}


/* =========================================================
   QUICK START CARD
   ========================================================= */

.quick-start-card {
    width: 100%;

    max-width: 1200px;

    margin: 0 auto 22px;

    box-sizing: border-box;
}

.quick-start-card .card-heading {
    margin-bottom: 22px;
}


/* =========================================================
   QUICK START STEPS
   ========================================================= */

.quick-start-steps {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}

.quick-step {
    min-width: 0;

    padding: 16px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 10px;
}

.step-number {
    margin-bottom: 12px;

    color: var(--exact-blue);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.8px;
}

.step-content h3 {
    margin: 0 0 5px;

    color: var(--text-primary);

    font-size: 13px;

    font-weight: 700;

    line-height: 1.35;
}

.step-content p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 11px;

    line-height: 1.55;
}


/* =========================================================
   SECURITY FOOTER
   ========================================================= */

.developer-security-footer {
    width: 100%;
    max-width: 1200px;

    box-sizing: border-box;

    display: flex;
    align-items: flex-start;

    gap: 13px;

    margin: 0 auto;

    padding: 17px 19px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);
}

.developer-security-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(41, 186, 34, 0.10);

    border-radius: 8px;

    color: var(--exact-green);

    font-size: 13px;
}

.developer-security-footer strong {
    display: block;

    margin-bottom: 4px;

    color: var(--text-primary);

    font-size: 13px;

    font-weight: 700;
}

.developer-security-footer p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 11px;

    line-height: 1.55;
}


/* =========================================================
   FORM RESET
   Prevent old Bootstrap/theme styles from interfering
   ========================================================= */

.developer-page button,
.developer-page input,
.developer-page textarea,
.developer-page select {
    font-family: inherit;
}

.developer-page button {
    box-shadow: none;
}

.developer-page form {
    margin-bottom: 0;
}


/* =========================================================
   BOOTSTRAP / OLD THEME OVERRIDES
   ========================================================= */

.developer-page .btn {
    box-shadow: none;
}

.developer-page .btn-primary {
    background-image: none;
}

.developer-page .card {
    margin-bottom: 0;
}

.developer-page p {
    word-break: normal;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1400px) {

    .developer-page {
        padding-left: 48px;
        padding-right: 48px;
    }

    .developer-grid,
    .quick-start-card,
    .developer-security-footer {
        max-width: 1250px;
    }

}


/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1100px) {

    .developer-page {
        padding: 30px 25px 50px;
    }

    .developer-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 17px;
    }

    .developer-card {
        padding: 22px;
    }

    .quick-start-steps {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 850px) {

    .developer-page {
        padding: 25px 20px 45px;
    }

    .developer-grid {
        grid-template-columns: 1fr;

        max-width: 700px;
    }

    .quick-start-card,
    .developer-security-footer {
        max-width: 700px;
    }

    .developer-hero-content {
        max-width: 700px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .developer-page {
        padding: 20px 14px 40px;
    }


    /* HERO */

    .developer-hero-content {
        gap: 12px;
    }

    .developer-icon {
        width: 40px;
        height: 40px;

        flex: 0 0 40px;

        font-size: 16px;
    }

    .developer-eyebrow {
        font-size: 9px;

        letter-spacing: 1px;
    }

    .developer-hero h1 {
        font-size: 29px;

        letter-spacing: -0.8px;
    }

    .developer-hero p {
        font-size: 13px;
    }


    /* SECURITY NOTICE */

    .security-notice {
        padding: 13px;

        gap: 10px;
    }

    .security-notice-icon {
        width: 32px;
        height: 32px;

        flex: 0 0 32px;
    }

    .security-notice-content strong {
        font-size: 12px;
    }

    .security-notice-content p {
        font-size: 11px;
    }


    /* CARDS */

    .developer-card {
        padding: 18px;

        border-radius: 13px;
    }

    .card-heading {
        gap: 10px;

        margin-bottom: 18px;
    }

    .heading-icon {
        width: 34px;
        height: 34px;

        flex: 0 0 34px;
    }

    .section-label {
        font-size: 9px;
    }

    .card-heading h2 {
        font-size: 21px;
    }

    .card-heading p {
        font-size: 12px;
    }


    /* API */

    .api-key-label {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .api-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .api-actions > *,
    .api-actions form {
        width: 100%;
    }

    .api-actions button {
        width: 100%;
    }


    /* DOCUMENTATION */

    .documentation-feature {
        padding: 10px;
    }

    .documentation-button {
        font-size: 12px;
    }


    /* QUICK START */

    .quick-start-steps {
        grid-template-columns: 1fr;

        gap: 9px;
    }

    .quick-step {
        padding: 13px;
    }


    /* SECURITY FOOTER */

    .developer-security-footer {
        padding: 14px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .developer-page {
        padding-left: 11px;
        padding-right: 11px;
    }

    .developer-card {
        padding: 15px;
    }

    .developer-hero h1 {
        font-size: 26px;
    }

    .api-key-value-row code {
        font-size: 10px;
    }

}