/**
 * SalesVu API Platform - OAuth Common Styles
 * 
 * Common CSS styles for all OAuth pages
 * 
 * @author SalesVu Team
 * @version 1.0
 * @date 2025-01-15
 */

@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

/* Base Styles */
html {
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    margin: 0px;
    padding: 0px;
    font-family: "Jost", sans-serif;
    background: #F1F6FA;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Prevent horizontal overflow on all elements */
* {
    box-sizing: border-box;
}

/* API Testing Interface Styles - More Specific Rules */
.main-wrapper .content-area .page-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    flex-wrap: nowrap;
}

.main-wrapper .content-area .page-header .header-left {
    flex: 1;
    display: block;
    margin-right: 20px;
}

.main-wrapper .content-area .page-header .header-right {
    flex-shrink: 0;
    display: block;
    align-self: flex-start;
    min-width: 200px;
}

.main-wrapper .content-area .page-header .header-right .header-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}

.main-wrapper .content-area .page-header .header-right .header-actions .btn {
    white-space: nowrap;
    min-width: 160px;
}

@media (max-width: 768px) {
    .main-wrapper .content-area .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .main-wrapper .content-area .page-header .header-left {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .main-wrapper .content-area .page-header .header-right {
        margin-left: 0;
        margin-top: 15px;
        min-width: auto;
    }
    
    .main-wrapper .content-area .page-header .header-right .header-actions {
        flex-direction: row;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .main-wrapper .content-area .page-header .header-right .header-actions .btn {
        min-width: auto;
        flex: 1;
    }
}

/* Ensure images and media don't overflow */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Main Wrapper */
.main-wrapper {
    width: 100%;
    background: #F1F6FA;
    min-height: 100vh;
    padding: 30px 0px;
}

.main-wrapper .content-area {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
/*    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
    box-sizing: border-box;*/
}

.main-wrapper .content-area .heading {
    font-size: 36px;
    font-weight: 400;
    line-height: 36px;
    margin-bottom: 10px;
    color: #333;
}

.main-wrapper .content-area .sub-heading {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 30px;
    color: #666;
}

/* Navigation */
.nav-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-bottom: 20px;
}

.nav-back-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Info Box */
.info-box {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-box h3 {
    margin: 0 0 10px 0;
    color: #0050b3;
    font-size: 18px;
}

.info-box p {
    margin: 0;
    color: #0050b3;
    font-size: 14px;
    line-height: 1.5;
}

/* Alert Messages */
.alert-msg {
    position: relative;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* API Reference page - By Cursor, 2026-05-20 */
.api-ref-body {
    padding-top: 64px;
}

.api-ref-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.api-ref-topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.api-ref-logo {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    white-space: nowrap;
}

.api-ref-logo span.portal-brand-text {
    color: #0b5cab!important;
	text-decoration:none;
}
.api-ref-logo span.portal-brand-mark {
    color: #fff;
}

.api-ref-topnav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.api-ref-topnav a {
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.api-ref-topnav a:hover {
    color: #0b5cab;
}

.api-ref-user {
    color: #64748b;
    font-size: 13px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-ref-signin-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: #0b5cab;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: background 0.2s ease;
}

.api-ref-signin-btn:hover {
    background: #094a8f;
    color: #fff !important;
}

.api-ref-signin-btn-outline {
    background: transparent;
    color: #0b5cab !important;
    border: 1px solid #0b5cab;
}

.api-ref-signin-btn-outline:hover {
    background: #eff6ff;
    color: #0b5cab !important;
}

.api-ref-wrapper {
    padding-top: 20px;
}

.api-ref-content {
    max-width: 1200px;
}

.api-ref-hero {
    margin-bottom: 10px;
}

.api-ref-section {
    margin-top: 40px;
}

.api-ref-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.api-ref-section-desc {
    color: #64748b;
    margin: 0 0 20px 0;
    font-size: 15px;
}

.api-ref-resource-block {
    margin-bottom: 28px;
}

.api-ref-resource-title {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 12px 0;
    padding-left: 12px;
    border-left: 4px solid #0b5cab;
}

.api-ref-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.api-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.api-ref-table th,
.api-ref-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.api-ref-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.api-ref-table tbody tr:last-child td {
    border-bottom: none;
}

.api-ref-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #0f172a;
    white-space: nowrap;
}

.api-ref-method {
    display: inline-block;
    min-width: 62px;
    text-align: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.method-get { background: #dcfce7; color: #166534; }
.method-post { background: #dbeafe; color: #1e40af; }
.method-put { background: #fef3c7; color: #92400e; }
.method-delete { background: #fee2e2; color: #991b1b; }
.method-patch { background: #f3e8ff; color: #6b21a8; }
.method-default { background: #e2e8f0; color: #334155; }

.api-ref-scope {
    color: #64748b;
    font-family: monospace;
    font-size: 12px;
}

.api-ref-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.api-ref-footer a {
    color: #0b5cab;
}

/* By Cursor, 2026-07-12: Expandable request/response documentation panels */
.api-ref-docs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.api-ref-docs-toggle:hover,
.api-ref-docs-toggle.is-open {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.api-ref-docs-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.15s ease;
}

.api-ref-docs-toggle.is-open::after {
    transform: rotate(180deg);
}

.api-ref-docs-pending {
    color: #94a3b8;
}

.api-ref-docs-row > td {
    background: #f8fafc;
    padding: 0 !important;
    border-bottom: 1px solid #e2e8f0;
}

.api-ref-docs-panel {
    padding: 18px 16px 20px;
}

.api-ref-docs-summary {
    margin: 0 0 12px;
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
}

.api-ref-docs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #475569;
}

.api-ref-docs-meta code {
    background: #e2e8f0;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.api-ref-docs-notes {
    margin: 0 0 16px;
    padding-left: 18px;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.api-ref-docs-notes li {
    margin-bottom: 4px;
}

.api-ref-docs-subtitle {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.api-ref-docs-params-wrap {
    margin-bottom: 16px;
}

.api-ref-docs-params th,
.api-ref-docs-params td {
    font-size: 13px;
}

.api-ref-docs-variant-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.api-ref-docs-variant-tab {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.api-ref-docs-variant-tab.is-active {
    background: #0b5cab;
    border-color: #0b5cab;
    color: #fff;
}

.api-ref-docs-samples {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.api-ref-docs-sample {
    min-width: 0;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.api-ref-docs-sample-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #1e293b;
}

.api-ref-docs-sample-header h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.api-ref-docs-copy {
    border: 1px solid #475569;
    background: transparent;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.api-ref-docs-copy:hover {
    background: #334155;
}

.api-ref-docs-code {
    margin: 0;
    padding: 14px;
    max-height: 420px;
    overflow: auto;
    color: #e2e8f0;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
    tab-size: 2;
}

/* By Cursor, 2026-07-12: Override .api-ref-table code { white-space: nowrap } so JSON keeps newlines. */
.api-ref-table .api-ref-docs-code,
.api-ref-table .api-ref-docs-code code {
    display: block;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre !important;
    word-break: normal;
    overflow-wrap: normal;
}

.api-ref-table .api-ref-docs-code {
    padding: 14px;
    color: #e2e8f0;
}

.api-ref-docs-explorer-hint {
    margin: 14px 0 0;
    font-size: 13px;
    color: #64748b;
}

.api-ref-docs-explorer-hint a {
    color: #0b5cab;
    font-weight: 600;
}

@media (max-width: 900px) {
    .api-ref-docs-samples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .api-ref-body {
        padding-top: 56px;
    }

    .api-ref-topbar-inner {
        height: auto;
        min-height: 56px;
        padding: 10px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .api-ref-topnav {
        width: 100%;
        gap: 12px;
    }

    .api-ref-user {
        display: none;
    }
}

/* Navigation Grid (for index page) */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nav-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-card:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.nav-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.nav-card .title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.nav-card .description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Apps Grid (for apps page) */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.app-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.app-card:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-card .app-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.app-card .app-type {
    font-size: 12px;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.app-card .app-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.app-card .app-meta {
    font-size: 12px;
    color: #999;
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
}

.app-card .authorize-btn {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

.app-card .authorize-btn:hover {
    background: #218838;
}

/* Tables */
.apps-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.apps-table th,
.apps-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.apps-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.apps-table tr:hover {
    background-color: #f8f9fa;
}

.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.scopes-list {
    font-size: 11px;
    color: #666;
    max-width: 200px;
}

.scopes-list span {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    margin: 1px;
    border-radius: 3px;
    font-size: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    color: #212529;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 25px;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    margin-bottom: 20px;
    overflow-y: auto;
    flex: 1;
    padding-right: 10px;
    min-height: 0; /* Allow flex item to shrink */
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input .form-control {
    padding-right: 45px; /* Make space for the icon */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
}

.password-toggle:hover {
    color: #495057;
}

.password-toggle:focus {
    outline: none;
    color: #007bff;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    background-color: #f8f9fa;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.checkbox-item:hover {
    background-color: #e9ecef;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-item label {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    flex: 1;
    word-break: break-word;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

/* App Registration Specific Styles */
.app-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.app-info h3 {
    margin: 0 0 10px 0;
    color: #007bff;
}

.app-info p {
    margin: 0;
    color: #666;
}

.scopes-list-detailed {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.scopes-list-detailed h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.scopes-list-detailed ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.scopes-list-detailed li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.scopes-list-detailed li:last-child {
    border-bottom: none;
}

.scopes-list-detailed .scope-name {
    font-weight: bold;
    color: #007bff;
}

.scopes-list-detailed .scope-desc {
    color: #666;
    font-size: 14px;
}

.scopes-list-detailed .scope-sensitive {
    color: #dc3545;
    font-size: 12px;
    font-weight: bold;
}

.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.buttons button {
    background: #000;
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    border: 0px;
    cursor: pointer;
}

.buttons .deny-btn {
    background: #dc3545;
}

.buttons .approve-btn {
    background: #28a745;
}

/* Credentials Section */
.credentials-section {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.code-block {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background-color: #0056b3;
}

/* No Apps Message */
.no-apps {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-apps .icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive Design */
/* Large screens and tablets */
@media screen and (max-width: 1200px) {
    .main-wrapper .content-area {
        max-width: 100%;
        margin: 0 20px;
        padding: 30px;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    .main-wrapper {
        padding: 15px;
    }
    
    .main-wrapper .content-area {
        margin: 0 10px;
        padding: 25px;
    }
    
    .main-wrapper .content-area .heading {
        font-size: 28px;
        line-height: 32px;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .apps-table {
        font-size: 12px;
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
        max-width: 95vw;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
        max-height: 250px;
        padding: 10px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .main-wrapper .content-form-area {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .main-wrapper {
        padding: 10px;
    }
    
    .main-wrapper .content-area {
        margin: 0 5px;
        padding: 20px;
        border-radius: 15px;
    }
    
    .main-wrapper .content-area .heading {
        font-size: 24px;
        line-height: 28px;
    }
    
    .main-wrapper .content-area .sub-head {
        font-size: 14px;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 10px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .checkbox-group {
        max-height: 200px;
        grid-template-columns: 1fr;
        padding: 8px;
    }
    
    .checkbox-item {
        padding: 4px 6px;
    }
    
    .checkbox-item label {
        font-size: 12px;
    }
    
    .testing-container {
        flex-direction: column;
    }
    
    .testing-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .app-card {
        padding: 15px;
    }
    
    .token-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .token-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .token-actions .btn {
        width: 100%;
    }
}

/* API Testing Interface Styles */
.testing-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.testing-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.testing-main {
    flex: 1;
    min-width: 0;
}

.token-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.token-info h3 {
    margin-bottom: 15px;
    color: #495057;
}

.token-details p {
    margin-bottom: 8px;
    font-size: 14px;
}

.token-details code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.endpoints-list {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.endpoints-list h3 {
    margin-bottom: 15px;
    color: #495057;
}

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

.endpoint-group h4 {
    margin-bottom: 5px;
    color: #6c757d;
    font-size: 16px;
}

.endpoint-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.endpoint-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.method-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.method-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.method-btn.selected {
    border-color: #007bff;
    background: #e3f2fd;
}

.method-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    min-width: 50px;
    text-align: center;
}

.method-get { background: #d4edda; color: #155724; }
.method-post { background: #cce5ff; color: #004085; }
.method-put { background: #fff3cd; color: #856404; }
.method-delete { background: #f8d7da; color: #721c24; }

.method-name {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.method-desc {
    font-size: 12px;
    color: #6c757d;
    flex: 1;
}

.request-builder {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.request-builder h3 {
    margin-bottom: 20px;
    color: #495057;
}

.request-url {
    margin-bottom: 15px;
}

.request-url label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.url-input-group {
    display: flex;
    align-items: center;
}

.url-prefix {
    background: #e9ecef;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    color: #6c757d;
}

.url-input-group .form-control {
    border-radius: 0 4px 4px 0;
}

.request-method {
    margin-bottom: 15px;
}

.request-method label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.request-headers {
    margin-bottom: 15px;
}

.request-headers label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.headers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-item {
    display: flex;
    gap: 10px;
}

.header-item .header-key {
    width: 150px;
    background: #f8f9fa;
}

.request-body {
    margin-bottom: 20px;
}

.request-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.response-display {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.response-display h3 {
    margin-bottom: 20px;
    color: #495057;
}

.response-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.response-status .status-label,
.response-time .time-label {
    font-weight: 600;
    color: #6c757d;
}

.status-code.success {
    color: #28a745;
    font-weight: bold;
}

.status-code.error {
    color: #dc3545;
    font-weight: bold;
}

.response-content {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.response-content pre {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.no-apps-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.no-apps-message .icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-apps-message h3 {
    margin-bottom: 10px;
    color: #495057;
}

.no-apps-message p {
    color: #6c757d;
    margin-bottom: 30px;
}

.no-apps-message .actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.app-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.app-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.app-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.app-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.app-info h3 {
    margin: 0 0 5px 0;
    color: #495057;
}

.app-type {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.app-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.app-scopes h4,
.app-tokens h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #495057;
}

.scopes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.scope-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.token-info {
    flex: 1;
}

.token-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-revoked {
    background: #f8d7da;
    color: #721c24;
}

.token-expiry {
    font-size: 11px;
    color: #6c757d;
}

.token-scopes {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.scope-mini {
    background: #e9ecef;
    color: #495057;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
}

.token-actions {
    margin-left: 15px;
}

.no-tokens {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Special layout for index page */
.main-wrapper.portal-home {
    padding: 24px 0 48px;
    background: #f1f6fa;
}

.main-wrapper .content-area.index-layout {
    max-width: 1100px;
    width: 94%;
    text-align: left;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* By Cursor, 2026-06-15: Developer portal home — hero, sections, quick actions */
.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.portal-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid #e2e8f0;
    max-width: 200px;
}

.portal-topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b5cab 0%, #063d73 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(11, 92, 171, 0.25);
}

.portal-topbar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-topbar-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: right;
    min-width: 0;
}

.portal-topbar-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.portal-topbar-label span {
    color: #0b5cab;
}

a.portal-topbar-label:hover {
    color: #0b5cab;
    text-decoration: none;
}

.browse-count-row .portal-btn-primary {
    padding: 10px 18px;
    font-size: 14px;
}

/* By Cursor, 2026-07-03: Browse apps toolbar — grouped actions + styled back link */
.browse-count-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.browse-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.browse-back-btn svg {
    flex-shrink: 0;
    color: #64748b;
    transition: color 0.2s, transform 0.2s;
}

.browse-back-btn:hover {
    color: #0b5cab;
    border-color: #93c5fd;
    background: #eff6ff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(11, 92, 171, 0.12);
    transform: translateY(-1px);
}

.browse-back-btn:hover svg {
    color: #0b5cab;
    transform: translateX(-2px);
}

/* By Cursor, 2026-07-03: API Testing pages — header aligned with portal console UI */
.api-test-page .browse-count-row {
    margin-bottom: 20px;
}

.api-test-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.api-test-switch-btn:hover {
    color: #0b5cab;
    border-color: #93c5fd;
    background: #eff6ff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(11, 92, 171, 0.12);
    transform: translateY(-1px);
}

.api-test-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    text-align: center;
}

.api-test-page-header-main {
    flex: 1;
    min-width: 0;
}

.api-test-page-header h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.api-test-page-header p {
    margin: 0;
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
   /*  max-width: 560px; */
}

.api-test-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
}

.api-test-user-chip i {
    color: #0b5cab;
}

.api-test-page .no-apps-message .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

@media (max-width: 768px) {
    .api-test-page-header {
        padding: 18px 20px;
    }

    .api-test-user-chip {
        width: 100%;
    }
}

.portal-topbar-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.portal-topbar-link:hover {
    background: #eff6ff;
    color: #0b5cab;
    text-decoration: none;
}

.portal-topbar-link.portal-topbar-link-active {
    background: #0b5cab;
    color: #fff;
}

.portal-topbar-divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 4px;
    flex-shrink: 0;
}

.portal-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.portal-hero-main {
    flex: 1;
    min-width: 0;
}

.portal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.portal-hero .portal-subtitle:last-child,
.portal-hero-main .portal-subtitle:last-of-type {
    margin-bottom: 0;
}

.portal-hero .portal-user-bar + .portal-subtitle,
.portal-hero-main .portal-subtitle {
    margin-bottom: 24px;
}

.portal-hero-main .portal-user-bar {
    margin-top: 0;
    margin-bottom: 0;
}

.portal-hero.browse-hero {
    padding: 28px 32px;
    margin-bottom: 24px;
}

.portal-hero.browse-hero h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.portal-hero.browse-hero .portal-subtitle {
    margin-bottom: 0;
    font-size: 15px;
}

.portal-page-content {
    max-width: 1100px;
    width: 94%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.portal-explorer-toolbar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.portal-explorer-toolbar p {
    margin-bottom: 12px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.portal-explorer-toolbar p:last-child {
    margin-bottom: 0;
}

.portal-hero {
    background: linear-gradient(135deg, #0b5cab 0%, #063d73 100%);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 32px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(11, 92, 171, 0.22);
    position: relative;
    overflow: hidden;
}

.portal-hero::after {
    content: '';
    position: absolute;
    top: -35%;
    right: -8%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.portal-hero-inner {
    position: relative;
    z-index: 1;
}

.portal-hero h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.25;
}

.portal-hero .portal-subtitle {
    font-size: 17px;
    margin: 0 0 24px;
    opacity: 0.92;
    max-width: 560px;
    line-height: 1.5;
    font-weight: 300;
}

.portal-user-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    margin-bottom: 0px;
    max-width: 480px;
}

.portal-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.portal-user-info {
    min-width: 0;
}

.portal-user-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
}

.portal-user-email {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}

.portal-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #fff;
    color: #0b5cab;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.portal-btn-primary:hover {
    color: #094a8f;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.portal-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.portal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}

.portal-section {
    margin-bottom: 36px;
}

.portal-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.index-layout .nav-grid {
    margin-top: 0;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.index-layout .nav-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.index-layout .nav-card:hover {
    background: #fff;
    border-color: #0b5cab;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.index-layout .nav-card.nav-card-featured {
    border-color: #0b5cab;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.index-layout .nav-card.nav-card-featured .title {
    color: #0b5cab;
}

.index-layout .nav-card .icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.index-layout .nav-card .title {
    font-size: 17px;
    color: #1e293b;
}

.index-layout .nav-card .description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
}

.portal-footer {
    margin-top: 40px;
    padding: 28px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}

.portal-footer p {
    margin: 0 0 12px;
}

.portal-footer a {
    color: #0b5cab;
    font-weight: 500;
}

.portal-footer .portal-logout {
    color: #64748b;
    font-size: 14px;
    text-decoration: none;
}

.portal-footer .portal-logout:hover {
    color: #0b5cab;
    text-decoration: underline;
}

/* By Cursor, 2026-06-15: Browse Applications (apps.php) */
.browse-apps-layout {
    max-width: 1100px;
    width: 94%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    text-align: left;
}

.browse-hero {
    padding: 28px 32px;
    margin-bottom: 24px;
}

.browse-hero h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.browse-hero .portal-subtitle {
    margin-bottom: 0;
    font-size: 15px;
}

.browse-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.browse-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.browse-count-badge strong {
    color: #0b5cab;
}

.browse-info-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.browse-info-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
}

.browse-info-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #1e3a8a;
}

.browse-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.browse-app-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.browse-app-card:hover {
    border-color: #0b5cab;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.browse-app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    background: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
}

.browse-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.browse-app-head-text {
    flex: 1;
    min-width: 0;
}

.browse-app-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e2e8f0;
    color: #475569;
    margin-bottom: 6px;
}

.browse-app-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.browse-app-body {
    padding: 18px 22px;
    flex: 1;
}

.browse-app-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 16px;
}

.browse-app-scopes-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.browse-scope-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.browse-scope-tag {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
}

.browse-scope-empty {
    font-size: 13px;
    color: #dc3545;
}

.browse-app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.browse-app-meta strong {
    color: #475569;
    font-weight: 600;
}

.browse-app-footer {
    padding: 16px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.browse-authorize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: #0b5cab;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.browse-authorize-btn:hover {
    background: #094a8f;
}

/* By Cursor, 2026-07-03: Test API CTA for already-authorized apps on browse page */
.browse-test-api-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.browse-test-api-btn:hover {
    background: #047857;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.browse-app-card--authorized {
    border-color: #a7f3d0;
}

.browse-app-card--authorized:hover {
    border-color: #059669;
}

.browse-empty {
    text-align: center;
    padding: 56px 32px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}

.browse-empty .icon {
    font-size: 56px;
    opacity: 0.4;
    margin-bottom: 16px;
}

.browse-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.browse-empty p {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 20px;
}

@media (max-width: 768px) {
    .browse-apps-grid {
        grid-template-columns: 1fr;
    }

    .browse-hero {
        padding: 22px 20px;
    }
}

.main-wrapper.portal-home.analytics-page .content-area.analytics-dashboard {
    max-width: 1280px;
    width: 94%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 768px) {
    .portal-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-topbar-links {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .portal-topbar-divider {
        display: none;
    }

    .portal-topbar-user {
        border-left: none;
        padding-left: 0;
        margin-top: 4px;
        max-width: none;
    }

    .portal-hero-row {
        flex-direction: column;
    }

    .portal-hero-actions {
        width: 100%;
    }

    .portal-hero-actions .portal-btn-primary,
    .portal-hero-actions .portal-btn-secondary {
        justify-content: center;
    }

    .portal-hero {
        padding: 28px 22px;
    }

    .portal-hero h1 {
        font-size: 26px;
    }

    .portal-quick-actions {
        flex-direction: column;
    }

    .portal-btn-primary,
    .portal-btn-secondary {
        justify-content: center;
        width: 100%;
    }

    .main-wrapper .content-area.index-layout {
        width: 92%;
    }
}


/* Special layout for consent page */
.main-wrapper .content-form-area {
    max-width: 900px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 0px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 63% 37%;
    gap: 0px;
    position: relative;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

/* Callback page specific styles */
.status-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-card h3 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 18px;
}

.info-card h4 {
    margin: 10px 0 8px 0;
    color: #495057;
    font-size: 16px;
}

.info-card p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 14px;
}

.code-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
    position: relative;
    margin: 10px 0;
}

.token-section {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.token-section h3 {
    color: #155724;
    margin: 0 0 15px 0;
}

.scope-list {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.scope-list ul {
    margin: 0;
    padding-left: 20px;
}

.scope-list li {
    margin: 5px 0;
    color: #856404;
}

.api-test-section {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.api-test-section h3 {
    color: #0c5460;
    margin: 0 0 15px 0;
}

.test-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
}

.test-btn:hover {
    background: #0056b3;
}

.test-btn.secondary {
    background: #6c757d;
}

.test-btn.secondary:hover {
    background: #545b62;
}

/* Login page specific styles */
.main-wrapper .content-form-area .content .text li {
    padding: 100px 10px 10px 10px;
    position: relative;
    text-align: center;
    font-size: 14px;
}

.main-wrapper .content-form-area .content .text li:before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: url(../../images2021/single-log-in.png) no-repeat left top;
    top: 14px;
    background-size: cover!important;
    left: 9px;
    margin-left: 0px;
}

.main-wrapper .content-form-area .content .text li:nth-child(2):before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: url(../../images2021/icon-privacy.png) no-repeat left top;
    top: 14px;
    background-size: cover!important;
    left: 9px;
}

.main-wrapper .content-form-area .form form input {
    width: 100%;
    padding: 12px 30px;
    border: solid 2px #f1eeeb;
    outline: 0px;
    font-size: 16px;
    outline: unset;
    border-radius: 5px;
    background: #fff;
    margin-bottom: 0px;
}

.main-wrapper .content-form-area .form form a {
    width: calc(100% - 20px);
    display: table;
    text-align: right;
    margin: 0px 10px 10px 10px;
    font-size: 15px;
    color: #447bb3;
}

.main-wrapper .content-form-area .form form button {
    background: #000;
    color: #fff;
    padding: 15px 55px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    border: 0px;
    width: 100% !important;
    margin-top: 0px;
}

.main-wrapper .content-form-area .form .msg {
    width: 100%;
    margin-top: 15px;
    font-size: 18px;
}

.main-wrapper .content-form-area .form .msg a {
    display: inline;
    color: #447bb3;
    font-size: 18px;
    padding: 0px !important;
    margin: 0px !important;
}

.main-wrapper .content-form-area .form .captcha {
    display: grid;
    grid-template-columns: 20% 57% 23%;
    width: 400px;
    border: 1px solid #d3d3d3;
    background: #f9f9f9;
    color: #000;
    width: 304px;
    margin-bottom: 20px;
    align-items: center;
}

.main-wrapper .content-form-area .form .captcha .checkbox {
    padding: 10px;
}

.main-wrapper .content-form-area .form .captcha .checkbox input[type="checkbox"] {
    width: 45px;
    height: 26px;
    margin: 0px;
    padding: 0px;
}

.main-wrapper .content-form-area .form .captcha .icon {
    padding: 10px;
    font-size: 9px;
    text-align: center;
}

.main-wrapper .content-form-area .form .captcha .icon img {
    width: 100%;
    height: auto;
}

.content-login .field {
    width: 100%;
    display: table;
    margin-bottom: 10px;
    position: relative;
}

.content-login .field .pass-eye-open {
    position: absolute;
    top: 1px;
    right: 0px;
    padding: 11px 20px;
    opacity: .3;
    cursor: pointer;
}

.content-login .field .pass-eye-close {
    position: absolute;
    top: 1px;
    right: 0px;
    padding: 11px 20px;
    opacity: 1;
    cursor: pointer;
}

.content-login .forgot {
    display: table;
    margin-bottom: 20px;
    text-align: right;
    margin-top: 0px;
    float: right;
}

.content-login .forgot a {
    width: 100%;
    display: inline-block;
    text-align: right;
    color: #000000 !important;
    font-weight: 400;
    font-size: 15px;
    padding: 0px 0px;
    text-decoration: underline !important;
}

.main-wrapper .content-form-area .content {
    background: #f1eeeb;
    position: relative;
    padding: 50px 10px;
    border-radius: 0px 20px 20px 0px;
    display: grid;
    align-items: center;
}

.main-wrapper .content-form-area .content .text {
    color: #000;
    padding: 0px;
    border-radius: 15px;
    position: relative;
    width: 100%;
    font-size: 15px;
}

.main-wrapper .content-form-area .content .text ul {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.main-wrapper .content-form-area .content .text li {
    padding: 20px 10px 20px 50px;
    position: relative;
    text-align: left;
    font-size: 14px;
}

.main-wrapper .content-form-area .form {
    padding: 50px 40px;
    border-radius: 20px 0px 0px 20px;
}

/* Consent page specific styles */
.main-wrapper .content-form-area .form .heading {
    font-size: 33px;
    font-weight: 400;
    line-height: 33px;
    margin-bottom: 10px;
    color: #333;
}

.main-wrapper .content-form-area .form .sub-head {
    font-size: 25px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #666;
}

.main-wrapper .content-form-area .form .alert-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Debug info styles */
.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 12px;
}

.debug-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.debug-info pre {
    margin: 0;
    white-space: pre-wrap;
}

@media screen and (min-width: 320px) and (max-width: 539px) {
    .main-wrapper .content-form-area {
        grid-template-columns: repeat(1, 1fr);
        padding: 10px;
        width: calc(100% - 23px);
    }
    
    .main-wrapper .content-form-area .form {
        padding: 20px;
    }
    
    .main-wrapper .content-form-area .content {
        padding: 20px;
        border-radius: 10px;
    }
}

/* By Cursor, 2026-06-15: Rate limit settings in Manage Applications edit modal */
.rate-limit-section {
    margin: 20px 0;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.rate-limit-heading {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.rate-limit-desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

.rate-limit-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
/**
 * SalesVu Developer Portal - Getting Started guide styles
 * By Cursor, 2026-06-15: Dedicated UI for getting-started.php
 */

 :root {
    --gs-primary: #0b5cab;
    --gs-primary-dark: #094a8f;
    --gs-primary-light: #eff6ff;
    --gs-surface: #ffffff;
    --gs-bg: #f1f6fa;
    --gs-border: #e2e8f0;
    --gs-text: #1e293b;
    --gs-text-muted: #64748b;
    --gs-radius: 12px;
    --gs-radius-sm: 8px;
    --gs-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Hero */
.gs-hero {
    background: linear-gradient(135deg, #0b5cab 0%, #063d73 100%);
    border-radius: var(--gs-radius);
    padding: 36px 40px;
    margin-bottom: 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.gs-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.gs-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.gs-hero h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.25;
}

.gs-hero p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    opacity: 0.92;
}

.gs-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.gs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Step overview pills */
.gs-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 4px 0;
}

.gs-overview a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gs-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.gs-overview a:hover {
    border-color: var(--gs-primary);
    color: var(--gs-primary);
    text-decoration: none;
}

.gs-overview-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--gs-primary-light);
    color: var(--gs-primary);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

/* Step cards */
.gs-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.gs-step {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 0;
    box-shadow: var(--gs-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.gs-step:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.gs-step-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.gs-step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gs-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
}

.gs-step-title-wrap {
    flex: 1;
    min-width: 0;
}

.gs-step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gs-text);
    margin: 0 0 4px;
}

.gs-step-subtitle {
    font-size: 14px;
    color: var(--gs-text-muted);
    margin: 0;
    line-height: 1.45;
}

.gs-step-body {
    padding: 24px 28px;
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
}

.gs-step-body p {
    margin: 0 0 14px;
}

.gs-step-body p:last-child {
    margin-bottom: 0;
}

.gs-step-body a {
    color: var(--gs-primary);
    font-weight: 500;
}

.gs-step-body a:hover {
    color: var(--gs-primary-dark);
}

.gs-step-body ol,
.gs-step-body ul {
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.gs-step-body ol li {
    position: relative;
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid #f1f5f9;
}

.gs-step-body ol li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gs-step-body ol li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    background: var(--gs-primary);
    border-radius: 50%;
    opacity: 0.5;
}

.gs-step-body ul li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.gs-step-body ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gs-primary);
    font-weight: bold;
}

.gs-step-body code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13px;
    font-family: ui-monospace, 'Cascadia Code', monospace;
}

.gs-step-footer {
    padding: 16px 28px;
    background: #f8fafc;
    border-top: 1px solid var(--gs-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.gs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gs-primary);
    color: #fff;
    border: none;
    border-radius: var(--gs-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.gs-btn:hover {
    background: var(--gs-primary-dark);
    color: #fff;
    text-decoration: none;
}

.gs-btn-outline {
    background: transparent;
    color: var(--gs-primary);
    border: 1px solid var(--gs-primary);
}

.gs-btn-outline:hover {
    background: var(--gs-primary-light);
    color: var(--gs-primary-dark);
}

/* Code block */
.gs-code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--gs-radius-sm);
    padding: 18px 20px;
    margin: 16px 0 0;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}

.gs-code-block .gs-code-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 10px;
}

/* Environments */
.gs-env-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.gs-env-card {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 24px;
    box-shadow: var(--gs-shadow);
}

.gs-env-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--gs-text);
    margin: 0 0 12px;
}

.gs-env-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gs-env-badge--sandbox {
    background: #fef3c7;
    color: #92400e;
}

.gs-env-badge--production {
    background: #d1fae5;
    color: #065f46;
}

.gs-env-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gs-text-muted);
    margin: 0;
}

.gs-env-card a {
    color: var(--gs-primary);
    font-weight: 500;
}

/* Quick links */
.gs-quick-links {
    background: var(--gs-primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--gs-radius);
    padding: 24px 28px;
}

.gs-quick-links h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gs-text);
    margin: 0 0 16px;
}

.gs-quick-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gs-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gs-text);
    text-decoration: none;
    transition: all 0.2s;
}

.gs-quick-link:hover {
    border-color: var(--gs-primary);
    color: var(--gs-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Active nav link in topbar */
.api-ref-topnav a.gs-nav-active {
    color: var(--gs-primary);
    font-weight: 600;
}

@media (max-width: 600px) {
    .rate-limit-fields {
        grid-template-columns: 1fr;
    }
    .gs-hero {
        padding: 28px 24px;
    }

    .gs-hero h1 {
        font-size: 26px;
    }

    .gs-step-header,
    .gs-step-body,
    .gs-step-footer {
        padding: 20px;
    }

    .gs-env-grid {
        grid-template-columns: 1fr;
    }

    .gs-overview {
        gap: 6px;
    }

    .gs-overview a {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ==========================================================================
   Developer landing page — By Cursor, 2026-06-30 (polished public homepage)
   ========================================================================== */

.landing-body {
    --landing-primary: #0b5cab;
    --landing-primary-dark: #094a8f;
    --landing-primary-light: #3b82f6;
    --landing-accent: #06b6d4;
    --landing-ink: #0f172a;
    --landing-muted: #64748b;
    --landing-border: #e2e8f0;
    --landing-surface: #ffffff;
    --landing-radius: 16px;
    --landing-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --landing-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --landing-shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
    background: #f0f4f8;
    padding-top: 64px;
}

.landing-body .api-ref-topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.landing-announcement {
    background: linear-gradient(105deg, #0a4d94 0%, #0b5cab 45%, #1d6fd4 100%);
    color: #fff;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-announcement-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.landing-announcement-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-announcement-text {
    flex: 1;
    min-width: 200px;
    opacity: 0.96;
    line-height: 1.45;
}

.landing-announcement-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.landing-announcement-link:hover {
    border-bottom-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    text-decoration: none;
}

.landing-main {
    display: block;
    overflow-x: hidden;
}

.landing-section {
    padding: 72px 28px;
    position: relative;
}

.landing-section-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.landing-section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--landing-primary);
    margin: 0 0 12px;
}

.landing-section-title {
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 600;
    color: var(--landing-ink);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.landing-section-desc {
    color: var(--landing-muted);
    font-size: 18px;
    line-height: 1.65;
    margin: 0 0 40px;
    max-width: 640px;
}

.landing-section-desc-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.landing-section-cta {
    margin-top: 32px;
    margin-bottom: 0;
    text-align: center;
}

/* Hero */
.landing-hero {
    position: relative;
    padding: 88px 28px 96px;
    overflow: hidden;
    background: var(--landing-surface);
    border-bottom: 1px solid var(--landing-border);
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(11, 92, 171, 0.14) 0%, transparent 55%),
        radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 35%);
    pointer-events: none;
}

.landing-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(11, 92, 171, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.landing-hero-eyebrow {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--landing-primary);
    margin: 0 0 20px;
}

.landing-hero h1 {
    font-size: clamp(36px, 5.5vw, 52px);
    font-weight: 600;
    line-height: 1.12;
    color: var(--landing-ink);
    margin: 0 0 24px;
    letter-spacing: -0.03em;
}

.landing-hero-lead {
    font-size: clamp(17px, 2.2vw, 20px);
    line-height: 1.7;
    color: #475569;
    margin: 0 auto 28px;
    max-width: 720px;
}

.landing-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
}

.landing-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid var(--landing-border);
    border-radius: 999px;
    box-shadow: var(--landing-shadow-sm);
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.landing-btn-primary {
    background: linear-gradient(180deg, #0d6ecf 0%, var(--landing-primary) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(11, 92, 171, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1) inset;
}

.landing-btn-primary:hover {
    background: linear-gradient(180deg, var(--landing-primary) 0%, var(--landing-primary-dark) 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(11, 92, 171, 0.4);
}

.landing-btn-secondary {
    background: var(--landing-surface);
    color: var(--landing-primary);
    border: 2px solid var(--landing-border);
    box-shadow: var(--landing-shadow-sm);
}

.landing-btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--landing-primary);
    color: var(--landing-primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--landing-shadow-md);
}

.landing-btn-on-dark {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
}

.landing-btn-on-dark:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* Use cases */
.landing-use-cases {
    background: linear-gradient(180deg, #eef3f8 0%, #f0f4f8 100%);
}

.landing-use-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) 1fr;
    gap: 28px;
    align-items: stretch;
}

.landing-use-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landing-use-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--landing-border);
    border-radius: 14px;
    background: var(--landing-surface);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--landing-shadow-sm);
    font-family: inherit;
}

.landing-use-tab:hover {
    border-color: #cbd5e1;
    transform: translateX(4px);
    box-shadow: var(--landing-shadow-md);
}

.landing-use-tab.is-active {
    border-color: var(--landing-primary);
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    box-shadow: 0 0 0 1px var(--landing-primary), var(--landing-shadow-md);
    transform: translateX(6px);
}

.landing-use-tab-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--landing-ink);
}

.landing-use-tab-sub {
    font-size: 12px;
    color: var(--landing-muted);
    margin-top: 5px;
    line-height: 1.4;
}

.landing-use-panels {
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    padding: 36px 40px;
    min-height: 320px;
    box-shadow: var(--landing-shadow-lg);
    position: relative;
    overflow: hidden;
}

.landing-use-panels::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--landing-primary), var(--landing-accent));
}

.landing-use-panel {
    display: none;
    animation: landingFadeIn 0.35s ease;
}

.landing-use-panel.is-active {
    display: block;
}

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

.landing-use-panel h3 {
    font-size: 24px;
    margin: 0 0 14px;
    color: var(--landing-ink);
    letter-spacing: -0.02em;
}

.landing-use-panel > p:first-of-type {
    color: #475569;
    line-height: 1.7;
    margin: 0 0 24px;
    font-size: 16px;
}

.landing-use-popular-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--landing-muted);
    margin-bottom: 12px !important;
}

.landing-use-api-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.landing-use-api-list li {
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    background: #fafbfc;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.landing-use-api-list li:hover {
    background: #f0f7ff;
    border-color: #dbeafe;
}

.landing-use-api-list li:last-child {
    margin-bottom: 0;
}

.landing-use-api-list code {
    font-size: 12px;
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    background: #e2e8f0;
    padding: 5px 10px;
    border-radius: 6px;
    color: #1e293b;
}

.landing-use-api-list li span {
    color: var(--landing-muted);
    font-size: 14px;
}

.landing-use-api-list a {
    color: var(--landing-primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}

.landing-use-api-list a:hover {
    text-decoration: underline;
}

.landing-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--landing-primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.landing-link-arrow:hover {
    color: var(--landing-primary-dark);
    gap: 10px;
    text-decoration: none;
}

/* API suites */
.landing-suites {
    background: var(--landing-surface);
}

.landing-suites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.landing-suite-card {
    position: relative;
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    padding: 28px 28px 24px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: landingFadeIn 0.5s ease backwards;
    animation-delay: var(--suite-delay, 0s);
}

.landing-suite-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--landing-shadow-lg);
    border-color: #cbd5e1;
}

.landing-suite-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--landing-primary), var(--landing-accent));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.landing-suite-card:hover .landing-suite-card-accent {
    opacity: 1;
}

.landing-suite-card h3 {
    font-size: 19px;
    margin: 0 0 12px;
    color: var(--landing-ink);
    letter-spacing: -0.01em;
}

.landing-suite-card p {
    color: var(--landing-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Content cards */
.landing-content {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.landing-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.landing-content-card {
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    padding: 28px;
    background: var(--landing-surface);
    box-shadow: var(--landing-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: landingFadeIn 0.5s ease backwards;
    animation-delay: var(--card-delay, 0s);
    display: flex;
    flex-direction: column;
}

.landing-content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--landing-shadow-md);
}

.landing-content-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--landing-primary);
    background: #eff6ff;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.landing-content-card h3 {
    font-size: 19px;
    margin: 0 0 10px;
    color: var(--landing-ink);
}

.landing-content-card p {
    color: var(--landing-muted);
    font-size: 15px;
    margin: 0 0 auto;
    padding-bottom: 18px;
    line-height: 1.6;
    flex: 1;
}

.landing-content-card a {
    color: var(--landing-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-top: auto;
}

.landing-content-card a:hover {
    text-decoration: underline;
}

/* Connect */
.landing-connect {
    background: var(--landing-surface);
}

.landing-connect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.landing-connect-card {
    display: block;
    padding: 28px;
    background: #f8fafc;
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    text-decoration: none;
    transition: all 0.25s ease;
}

.landing-connect-card:hover {
    background: var(--landing-surface);
    border-color: var(--landing-primary);
    box-shadow: var(--landing-shadow-md);
    transform: translateY(-4px);
    text-decoration: none;
}

.landing-connect-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 22px;
    background: #eff6ff;
    border-radius: 12px;
    margin-bottom: 16px;
}

.landing-connect-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--landing-ink);
    margin: 0 0 8px;
}

.landing-connect-card p {
    font-size: 14px;
    color: var(--landing-muted);
    margin: 0;
    line-height: 1.5;
}

/* Partner */
.landing-partner {
    position: relative;
    text-align: center;
    padding: 80px 28px;
    overflow: hidden;
}

.landing-partner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    pointer-events: none;
}

.landing-partner-inner {
    position: relative;
    z-index: 1;
}

.landing-partner-inner .landing-section-title {
    margin-bottom: 16px;
}

.landing-partner-inner p {
    color: var(--landing-muted);
    max-width: 520px;
    margin: 0 auto 28px;
    font-size: 18px;
    line-height: 1.65;
}

/* Final CTA */
.landing-final-cta {
    background: linear-gradient(135deg, #0a4d94 0%, #0b5cab 40%, #1e40af 100%);
    color: #fff;
    padding: 80px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-final-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.landing-final-cta-inner {
    position: relative;
    z-index: 1;
}

.landing-final-cta h2 {
    font-size: clamp(28px, 4vw, 38px);
    margin: 0 0 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.landing-footer {
    background: #0c1222;
    color: #94a3b8;
    text-align: center;
    padding: 32px 28px;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-footer a {
    color: #7dd3fc;
    text-decoration: none;
}

.landing-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .landing-use-layout {
        grid-template-columns: 1fr;
    }

    .landing-use-tabs {
        flex-direction: row;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }

    .landing-use-tab {
        min-width: 210px;
        flex-shrink: 0;
    }

    .landing-use-tab:hover,
    .landing-use-tab.is-active {
        transform: none;
    }

    .landing-hero {
        padding: 56px 20px 64px;
    }

    .landing-section {
        padding: 52px 20px;
    }

    .landing-use-panels {
        padding: 24px 22px;
    }

    .landing-partner {
        padding: 56px 20px;
    }

    .landing-final-cta {
        padding: 56px 20px;
    }
}

@media (max-width: 480px) {
    .landing-hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .landing-btn {
        width: 100%;
        max-width: 320px;
    }

    .landing-hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* By Cursor, 2026-07-07: API testing token table + detail modal */
.api-test-tokens-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.api-test-tokens-table {
    margin-bottom: 0;
    font-size: 14px;
}

.api-test-tokens-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.api-test-tokens-table tbody td {
    vertical-align: middle;
    border-top: 1px solid #eef2f7;
}

.api-test-merchant-cell {
    min-width: 220px;
}

.api-test-merchant-name,
.api-test-app-name {
    display: block;
    font-weight: 600;
    color: #0f172a;
}

.api-test-merchant-meta,
.api-test-app-meta {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.api-test-env-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.api-test-env-production {
    background: #ecfdf5;
    color: #047857;
}

.api-test-env-sandbox {
    background: #fff7ed;
    color: #c2410c;
}

.api-test-actions-col {
    min-width: 280px;
    white-space: nowrap;
}

.api-test-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* By Cursor, 2026-07-20: Inline delete form stays aligned with View/Test buttons. */
.api-test-delete-token-form {
    display: inline-flex;
    margin: 0;
}

.api-test-token-modal .modal-header {
    border-bottom: 1px solid #e2e8f0;
}

.api-test-token-modal .modal-footer {
    border-top: 1px solid #e2e8f0;
}

.api-test-modal-section {
    margin-bottom: 18px;
}

.api-test-modal-section h6,
.api-test-modal-grid h6 {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.api-test-modal-value {
    margin-bottom: 0;
    color: #0f172a;
}

.api-test-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.api-test-mono {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    word-break: break-all;
}

.api-test-copy-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.api-test-copy-field code {
    flex: 1;
    background: transparent;
    color: #0f172a;
    white-space: pre-wrap;
}

.api-test-scope-detail-list {
    margin: 0;
    padding-left: 18px;
}

.api-test-scope-detail-list li {
    margin-bottom: 8px;
    color: #334155;
}

@media (max-width: 992px) {
    .api-test-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .api-test-row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .api-test-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* By Cursor, 2026-07-07: BS4 modal must win over generic oauth.css .modal { display:none } rules. */
#tokenDetailModal.modal.show {
    display: block !important;
}

#tokenDetailModal.modal.fade .modal-dialog {
    transform: translate(0, 0);
}

#tokenDetailModal .modal-dialog {
    margin: 1.75rem auto;
    max-width: 900px;
}

#tokenDetailModal .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* By Cursor, 2026-07-10: Copy-to-clipboard controls for Client ID / Secret */
.portal-copy-field {
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 10px 0 0;
}

.portal-copy-field__body {
    flex: 1;
    min-width: 0;
}

.portal-copy-field__label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.portal-copy-field__value,
.portal-copy-field code {
    display: block;
    margin: 0;
    padding: 8px 10px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    word-break: break-all;
}

.portal-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.portal-copy-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.portal-copy-btn--copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.portal-copy-btn--inline {
    width: 28px;
    height: 28px;
    margin-left: 6px;
    vertical-align: middle;
}

.portal-copy-inline-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ma-cred-card .portal-copy-field {
    margin-top: 8px;
}

.input-group-append .portal-copy-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: calc(1.5em + 0.75rem + 2px);
}

/* By Cursor, 2026-07-16: Shared alert/confirm dialog (replaces native window.alert / window.confirm). */
html.portal-dialog-open {
    overflow: hidden;
}

.portal-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.portal-dialog-root[hidden] {
    display: none !important;
}

.portal-dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.portal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
    padding: 28px 28px 22px;
    text-align: center;
    animation: portal-dialog-in 0.18s ease-out;
}

@keyframes portal-dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.portal-dialog-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.portal-dialog-icon--info {
    background: rgba(11, 92, 171, 0.1);
    color: #0b5cab;
}

.portal-dialog-icon--success {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.portal-dialog-icon--warning {
    background: rgba(255, 193, 7, 0.18);
    color: #b45309;
}

.portal-dialog-icon--error {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.portal-dialog-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.portal-dialog-message {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.55;
    color: #64748b;
    white-space: pre-wrap;
}

.portal-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-dialog-btn {
    min-width: 96px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.portal-dialog-btn:hover {
    transform: translateY(-1px);
}

.portal-dialog-btn--primary {
    background: #0b5cab;
    color: #ffffff;
}

.portal-dialog-btn--primary:hover {
    background: #063d73;
}

.portal-dialog-btn--secondary {
    background: #e2e8f0;
    color: #334155;
}

.portal-dialog-btn--secondary:hover {
    background: #cbd5e1;
}

.portal-dialog-btn--danger {
    background: #dc3545;
    color: #ffffff;
}

.portal-dialog-btn--danger:hover {
    background: #bb2d3b;
}
