@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --app-bg: #0b1220;
    --app-surface: #131c2e;
    --app-surface-elevated: #1a2540;
    --app-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --app-border: #2a3f66;
    --app-muted: #94a3b8;
    --app-text: #e2e8f0;
}

:root,
[data-bs-theme="dark"] {
    --bs-font-sans-serif: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Buttons and text fields: consistent corner radius */
.btn,
.btn-sm,
.btn-lg,
.form-control,
.form-control-sm,
.form-control-lg,
.form-select,
.form-select-sm,
.form-select-lg {
    border-radius: 5px;
}

body.app-body {
    font-family: var(--bs-body-font-family);
    background: var(--app-bg);
    color: var(--app-text);
}

html {
    font-family: var(--bs-body-font-family);
}

.app-navbar {
    border-bottom: 1px solid var(--app-border);
    background: rgba(19, 28, 46, 0.96);
    backdrop-filter: blur(8px);
}

.app-navbar .navbar-brand {
    color: var(--app-text);
}

.app-brand-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-brand-icon-lg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.app-card {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: var(--app-card-shadow);
    background: var(--app-surface);
    color: var(--app-text);
}

.card-title-sm {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.dashboard-create-import-cards .card-body {
    font-size: 0.8125rem;
}

.dashboard-create-import-cards .form-control,
.dashboard-create-import-cards .form-select,
.dashboard-create-import-cards textarea.form-control {
    font-size: 0.8125rem;
}

.dashboard-create-import-cards .form-control-lg {
    font-size: 0.875rem;
    min-height: calc(1.45em + 0.65rem + 2px);
    padding: 0.45rem 0.65rem;
}

.dashboard-create-import-cards .btn {
    font-size: 0.8125rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
}

.stat-tile {
    background: var(--app-surface-elevated);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 0.8rem;
}

.stat-tile .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-muted);
}

.stat-tile .value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.table-clean thead th {
    background: var(--app-surface-elevated);
    color: var(--app-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
    border-color: var(--app-border);
}

.table-clean td,
.table-clean th {
    vertical-align: middle;
    border-color: var(--app-border);
}

.table-clean {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    font-size: 0.875rem;
}

/* Dashboard Lists & Progress: wider Name column (2nd col). */
.table-lists-progress th:nth-child(2),
.table-lists-progress td:nth-child(2) {
    min-width: 16rem;
    width: 26%;
    max-width: 28rem;
    white-space: normal;
    word-break: break-word;
}

.btn-soft {
    border: 1px solid var(--app-border);
    background: var(--app-surface-elevated);
    color: var(--app-text);
}

.btn-soft:hover {
    background: #243352;
    color: var(--app-text);
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.btn-action-icon i {
    display: block;
    line-height: 1;
}

.btn-action-icon:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.action-tooltip-wrap {
    line-height: 0;
    vertical-align: middle;
}

.app-cron-path-box {
    border-radius: 5px;
    background: var(--app-surface-elevated);
    border-color: var(--app-border) !important;
    color: var(--app-text);
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    max-width: 900px;
    width: 100%;
}

.auth-hero {
    background: linear-gradient(140deg, #1d4ed8, #1e3a8a 55%, #2563eb);
    color: #fff;
    border-radius: 14px 0 0 14px;
    padding: 2rem;
}

.auth-pane {
    padding: 2rem;
    background: var(--app-surface);
}

.auth-muted {
    color: #bfdbfe;
}

.empty-state {
    border: 1px dashed var(--app-border);
    border-radius: 12px;
    padding: 1.1rem;
    color: var(--app-muted);
    background: var(--app-surface-elevated);
}

@media (max-width: 991px) {
    .auth-hero {
        border-radius: 14px 14px 0 0;
    }
}
