:root {
    --bg-deep: #0b0a17;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --text-light: #f5f3ff;
    --text-muted: #a9a3c9;
    --accent-1: #7c3aed;
    --accent-2: #2563eb;
    --danger: #f87171;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: var(--bg-deep);
    color: var(--text-light);
    min-height: 100vh;
}

/* ---------- Auth (login) page ---------- */

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.55;
    z-index: 0;
    animation: float 12s ease-in-out infinite;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: var(--accent-1);
    top: -120px;
    left: -100px;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: var(--accent-2);
    bottom: -140px;
    right: -100px;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-logo {
    width: 44px;
    height: 44px;
}

.brand-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.brand-text span {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-title {
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 28px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

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

.input-wrap svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input::placeholder {
    color: #6f6a91;
}

.input-wrap input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: var(--danger);
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Home / dashboard shell ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
}

.topbar .brand {
    margin: 0;
}

.topbar .brand-logo {
    width: 32px;
    height: 32px;
}

.topbar .brand-text {
    font-size: 17px;
}

.main-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
}

.nav-link.active {
    background: rgba(124, 58, 237, 0.18);
    color: var(--text-light);
}

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

.user-chip span {
    font-size: 14px;
    color: var(--text-muted);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.home-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}

.home-content h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.home-content p {
    color: var(--text-muted);
}

/* ---------- Log API page ---------- */

.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.page-content h1 {
    font-size: 22px;
    margin: 0 0 24px;
}

.cards-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.status-card {
    flex: 1;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px 20px;
}

.status-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.status-card .value {
    font-size: 19px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-ok {
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
}

.dot-error {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.dot-muted {
    background: #6f6a91;
}

.section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.section-header h2 {
    font-size: 16px;
    margin: 0;
}

.section-header .hint {
    font-size: 12px;
    color: var(--text-muted);
}

.table-wrap {
    overflow-x: auto;
}

table.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.logs-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

.logs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-2xx {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.badge-4xx {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.badge-5xx {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 13px;
}

.footer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.toolbar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.toolbar .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toolbar .field label {
    font-size: 12px;
    color: var(--text-muted);
}

.toolbar input[type="date"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font-size: 13px;
    outline: none;
    color-scheme: dark;
}

.toolbar input[type="date"]:focus {
    border-color: var(--accent-2);
}

.btn-danger {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.22);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-msg {
    font-size: 13px;
    color: var(--text-muted);
    align-self: center;
}

.monitor-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.switch {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .track {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    transition: background 0.15s;
}

.switch .track::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}

.switch input:checked + .track {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.switch input:checked + .track::before {
    transform: translateX(16px);
}

.dot-live {
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pagination {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin-top: 16px;
}

.pagination .page-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Documentação API ---------- */

.page-intro {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 720px;
    margin: -12px 0 28px;
    line-height: 1.6;
}

.download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.endpoint-card + .endpoint-card {
    margin-top: 0;
}

.method-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-right: 6px;
    vertical-align: middle;
}

.method-get {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.method-delete {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.endpoint-path {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 15px;
    color: var(--text-light);
    vertical-align: middle;
}

.tester-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0;
}

.tester-row .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tester-row .field label {
    font-size: 12px;
    color: var(--text-muted);
}

.tester-row input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font-size: 13px;
    outline: none;
    color-scheme: dark;
    width: 120px;
}

.tester-row input:focus {
    border-color: var(--accent-2);
}

.code-block {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px 16px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 12.5px;
    color: #c9c4ea;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
}
