:root {
    --primary-color: #00afef;
    --primary-dark: #006cab;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
.header {
    background: var(--header-bg);
    color: var(--header-text);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

.logo .tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Tracking Form */
.tracking-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

/* Account Required Section */
.account-required {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.account-message {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.account-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.flex-grow {
    flex: 1;
    min-width: 300px;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 175, 239, 0.1);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

select.form-control {
    cursor: pointer;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #475569;
}

/* Additional button variants for admin */
.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #0a9a6a;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: var(--warning-color);
    color: #111827;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-info:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-track {
    white-space: nowrap;
}

/* Features */
.features {
    margin: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #cffafe;
    color: #155e75;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* Tracking Result */
.tracking-result {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.result-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.result-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.result-details {
    padding: 2rem;
}

.detail-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    font-weight: 600;
    min-width: 150px;
    color: var(--text-dark);
}

.detail-value {
    color: var(--text-muted);
}

.external-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.external-link:hover {
    text-decoration: underline;
}

/* Order History / Timeline */
.order-history {
    padding: 2rem;
    background: var(--light-bg);
}

.order-history h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.65rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--border-color);
    border: 3px solid var(--white);
}

.timeline-item.active .timeline-dot {
    background: var(--primary-color);
}

.timeline-content {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.timeline-location {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-card .text-muted {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.demo-info {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

/* Dashboard */
.view-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.view-switcher .btn {
    background: var(--white);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.view-switcher .btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.orders-list-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.order-card {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.order-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.order-body {
    padding: 1.5rem;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.order-detail .label {
    font-weight: 500;
    color: var(--text-dark);
}

.order-detail .value {
    color: var(--text-muted);
    text-align: right;
}

.order-footer {
    padding: 1rem 1.5rem;
    background: var(--light-bg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Admin Panel */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Admin header button group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form textarea.form-control {
    resize: vertical;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table thead {
    background: var(--light-bg);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-section {
    text-align: left;
}

.footer p {
    margin: 0.5rem 0;
    color: var(--border-color);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-sep {
    color: var(--border-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

.action-buttons form {
    margin: 0;
}

/* Table Improvements */
.table td {
    vertical-align: middle;
}

.table .badge {
    font-size: 0.75rem;
}

.table .text-muted {
    font-size: 0.75rem;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.bg-surface {
    background: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero-title {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group.flex-grow {
        min-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .detail-label {
        min-width: auto;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }
}

/* Modal styles to override Bootstrap defaults if needed */
.modal-dialog.modal-xl {
    max-width: 95%;
}

@media (min-width: 1200px) {
    .modal-dialog.modal-xl {
        max-width: 1400px;
    }
}

.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-body iframe {
    border-radius: 4px;
}


/* User Link */
.user-name {
    text-decoration: none;
    transition: color 0.2s;
}

.user-name:hover {
    color: var(--primary-color);
}

/* Dark Mode Variables */
:root {
    --header-bg: var(--white);
    --header-text: var(--text-dark);
    --footer-bg: var(--text-dark);
}

[data-theme="dark"] {
    --light-bg: #0f172a;
    --white: #1e293b;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.5), 0 1px 2px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);

    --header-bg: #1e293b;
    --header-text: #f1f5f9;
    --footer-bg: #1e293b;
}

[data-theme="dark"] .logo-image {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .footer p {
    color: #94a3b8;
}

[data-theme="dark"] .footer-links a {
    color: #f1f5f9;
}

[data-theme="dark"] .footer-sep {
    color: #94a3b8;
}

[data-theme="dark"] .table thead,
[data-theme="dark"] table.dataTable thead th {
    background: var(--light-bg);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] table.dataTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .admin-card {
    background: var(--white);
}

/* Dark mode: filter section and form controls */
[data-theme="dark"] .filter-section {
    background: var(--white);
}

[data-theme="dark"] .filter-group label {
    color: var(--text-dark);
}

[data-theme="dark"] .filter-group select,
[data-theme="dark"] .filter-group input[type="date"],
[data-theme="dark"] .filter-group input[type="text"] {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

/* Dark mode: all inputs, textarea, select (profile, forms, etc.) */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 175, 239, 0.2);
}

/* Dark mode: date input (box and native picker hint) */
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="time"] {
    color-scheme: dark;
}

/* Dark mode: Select2 boxes */
[data-theme="dark"] .select2-container .select2-selection--single,
[data-theme="dark"] .select2-container--default .select2-selection--single {
    background: var(--white) !important;
    color: var(--text-dark) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .select2-container .select2-selection--single .select2-selection__rendered,
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark) !important;
}

[data-theme="dark"] .select2-dropdown {
    background: var(--white) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__option {
    background: var(--white) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background: var(--white) !important;
    color: var(--text-dark) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-dark) transparent transparent transparent !important;
}

/* Dark mode: checkboxes and radios */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
    accent-color: var(--primary-color);
}

/* Dark mode: home page hero and stat cards */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

[data-theme="dark"] .stat-value {
    color: var(--text-dark);
}

[data-theme="dark"] .stat-label {
    color: var(--text-muted);
}

[data-theme="dark"] .stat-item {
    background: var(--white);
    color: var(--text-dark);
}

[data-theme="dark"] .stat-item .stat-number {
    color: var(--primary-color);
}

[data-theme="dark"] .stat-item .stat-label {
    color: var(--text-muted);
}

/* Test API Santos Vale page – theme-aware */
.api-test-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.api-test-container .test-form {
    background: var(--light-bg);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.api-test-container .form-group {
    margin-bottom: 1rem;
}

.api-test-container .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--text-dark);
}

.api-test-container .form-group input,
.api-test-container .form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: var(--white);
    color: var(--text-dark);
}

.api-test-container .btn-test {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.api-test-container .btn-test:hover {
    background: var(--primary-dark);
}

.api-test-container .result-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-top: 1.25rem;
}

.api-test-container .pdf-viewer {
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
}

.api-test-container .pdf-viewer iframe {
    width: 100%;
    height: 700px;
    border-radius: 0.25rem;
}

.api-test-container .json-result {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text-dark);
}

.api-test-container .api-info {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.api-test-container .api-info h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.api-test-container .api-info ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.api-test-container .api-env-box {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.api-test-container .status-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.api-test-container .status-success {
    background: #d4edda;
    color: #155724;
}

.api-test-container .status-error {
    background: #f8d7da;
    color: #721c24;
}

[data-theme="dark"] .api-test-container .test-form,
[data-theme="dark"] .api-test-container .api-info,
[data-theme="dark"] .api-test-container .api-env-box {
    background: var(--white);
    border-color: var(--border-color);
}

[data-theme="dark"] .api-test-container .json-result {
    background: var(--white);
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .api-test-container .result-container {
    background: var(--white);
    border-color: var(--border-color);
}

/* FTP table – theme-aware */
.ftp-table {
    width: 100%;
    border-collapse: collapse;
}

.ftp-table th {
    background: var(--light-bg);
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-dark);
}

.ftp-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.ftp-table tbody tr:hover {
    background: var(--light-bg);
}

[data-theme="dark"] .ftp-table th {
    background: var(--white);
    color: var(--text-dark);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .ftp-table td {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .ftp-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}