﻿:root {
    --primary-gradient: linear-gradient(135deg, #258cfb, #1a73e8);
    --surface-card: #fff;
    --text-primary: #333;
    --text-muted: #6c757d;
}

[data-bs-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #1a73e8, #0d47a1);
    --surface-card: #2d333b;
    --text-primary: #e6e6e6;
    --text-muted: #9ca3af;
}

/* Base */
html, body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    background: var(--bs-body-bg, #f0f2f5);
    color: var(--bs-body-color, #333);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg,#258cfb,#1a73e8);
    color: #fff;
    padding: 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

    .page-header h6 {
        margin: 0;
        font-weight: 600;
        font-size: 1.2rem;
    }

    .page-header .actions {
        display: flex;
        gap: 0.5rem;
    }

/* Circle Button - base */
.btn-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

    .btn-circle:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: translateY(-1px) scale(1.05);
        box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    }

    .btn-circle:active {
        transform: scale(0.95);
        box-shadow: 0 2px 3px rgba(0,0,0,0.2);
    }

/* Variant khusus untuk header */
.page-header .btn-circle {
    border: none; /* hapus border karena header gradient */
    backdrop-filter: none; /* lebih clean */
    box-shadow: none; /* hilangkan shadow default */
}
.page-header .icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 20, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


.page-content {
    flex: 1;
    padding: 1rem;
}

.page-footer {
    background: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    /* color: #666; */
    text-align: center;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Badge pill */
.badge-pill {
    border-radius: 50rem;
    padding: 0.2em 0.8em;
    font-size: 0.75rem;
    background-color: rgba(255,255,255,0.9);
    color: var(--text-primary);
    font-weight: 500;
}


/* Section headers */
.section-header {
    background-color: var(--bs-light-bg-subtle, #f8f9fa);
    border-left: 4px solid #258cfb;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

    .section-header h6 {
        margin: 0;
        font-weight: 600;
        font-size: 0.9rem;
        color: #258cfb;
    }

/* Status box */
.status {
    background: var(--surface-card);
    padding: 0.75rem 0rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    margin-bottom: 1rem;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted) !important;
}

.small-text {
    font-size: 0.875rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Form controls */
.form-control {
    border-color: #dee2e6;
}

    .form-control:focus {
        border-color: #258cfb;
        box-shadow: 0 0 0 0.25rem rgba(37,140,251,.25);
    }

/* Tab styling */
.nav-tabs {
    border-bottom-color: #dee2e6;
}

    .nav-tabs .nav-link {
        color: var(--text-muted);
    }

        .nav-tabs .nav-link.active {
            color: #258cfb;
            border-color: #dee2e6 #dee2e6 var(--surface-card);
        }

/* Custom textarea */
textarea.code-area {
    height: 200px;
    min-height: 200px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    tab-size: 4;
    white-space: pre; /* cegah word-wrap */
    overflow-x: auto; /* aktifkan scroll horizontal */
    overflow-y: auto; /* scroll vertical tetap ada */
    resize: vertical; /* biar user bisa resize */
}


/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    flex-direction: column;
    opacity: 0; /* awal invisible */
    visibility: hidden; /* biar tidak bisa diklik */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

    .loading-overlay.show {
        opacity: 1;
        visibility: visible;
    }

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Dark mode overrides */
[data-bs-theme="dark"] .card {
    background: var(--surface-card);
}

[data-bs-theme="dark"] .status {
    background: var(--surface-card);
}

[data-bs-theme="dark"] .form-control {
    background-color: #22272e;
    border-color: #373e47;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .badge-pill {
    background-color: rgba(255,255,255,.1);
    color: var(--text-primary);
}

/* Header & Footer fix, Content flexible */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.page-header {
    flex: 0 0 auto;
}

.page-footer {
    flex: 0 0 auto;
}

.page-content {
    flex: 1 1 auto;
    overflow-y: auto; /* hanya konten yang scroll */
    overflow-x: hidden;
    padding: 1rem;
}

