:root {
    --bg-main: #07111f;
    --bg-soft: #0c1b2e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-strong: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.14);
    --text-main: #ecf6ff;
    --text-soft: #a9bfd4;
    --accent: #63e6ff;
    --accent-2: #7c5cff;
    --success-soft: #2ac58b;
    --warning-soft: #ffbf47;
    --danger-soft: #ff6b81;
    --shadow-main: 0 20px 45px rgba(0, 0, 0, 0.28);
    --radius-main: 24px;
}

html, body {
    min-height: 100%;
}

body.smartfrost-body {
    background:
        radial-gradient(circle at top left, rgba(99, 230, 255, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(124, 92, 255, 0.10), transparent 24%),
        linear-gradient(180deg, #08111d 0%, #0b1626 45%, #0c1729 100%);
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
    overflow-x: hidden;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 260px;
    height: 260px;
    top: 80px;
    left: -60px;
    background: #39d9ff;
}

.orb-2 {
    width: 320px;
    height: 320px;
    top: 260px;
    right: -110px;
    background: #6f5cff;
}

.orb-3 {
    width: 240px;
    height: 240px;
    bottom: 40px;
    left: 20%;
    background: #1dc7a3;
}

main.container {
    z-index: 2;
}

.smart-navbar {
    background: rgba(7, 17, 31, 0.72) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.smart-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: 0.2px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 10px 20px rgba(99, 230, 255, 0.28);
}

.navbar .nav-link {
    color: rgba(236, 246, 255, 0.82) !important;
    font-weight: 500;
    transition: 0.2s ease;
}

.navbar .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

.user-chip {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--border-soft);
    color: var(--text-main) !important;
    padding: 8px 14px;
    border-radius: 999px;
}

.smart-btn-light {
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
}

.hero-panel {
    background: linear-gradient(135deg, rgba(99, 230, 255, 0.18), rgba(124, 92, 255, 0.18));
    border: 1px solid var(--border-soft);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 45%, rgba(255,255,255,0.02));
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 760px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    padding: 8px 14px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.card,
.smart-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: var(--radius-main) !important;
    box-shadow: var(--shadow-main) !important;
    backdrop-filter: blur(14px);
    color: var(--text-main);
}

.card .card-body {
    color: var(--text-main);
}

.stat-card {
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

h1, h2, h3, h4, h5, h6 {
    color: #f4fbff;
    font-weight: 700;
}

p, span, li, label, td, th, small {
    color: inherit;
}

.text-muted {
    color: var(--text-soft) !important;
}

.display-6 {
    font-weight: 800;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: 16px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(99, 230, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success {
    border-radius: 14px;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    border-radius: 16px;
    padding: 0.8rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-main);
    border-color: rgba(99, 230, 255, 0.65);
    box-shadow: 0 0 0 0.25rem rgba(99, 230, 255, 0.16);
}

.form-control::placeholder {
    color: rgba(236, 246, 255, 0.45);
}

.table {
    color: var(--text-main);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    background: transparent !important;
    border-bottom-color: rgba(255,255,255,0.08);
}

.table thead th {
    color: #d9efff;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.table-warning,
.table-warning > td,
.table-warning > th {
    --bs-table-bg: rgba(255, 191, 71, 0.10) !important;
}

.badge {
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    font-weight: 700;
}

.progress {
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.alert {
    border: none;
    border-radius: 18px;
}

.smart-alert {
    backdrop-filter: blur(10px);
}

.list-group-item {
    background: transparent !important;
    color: var(--text-main);
    border-color: rgba(255,255,255,0.08);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: #a8f0ff;
}

.auth-shell {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 560px;
    width: 100%;
}

.smart-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.frost-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    font-size: 0.92rem;
}

.empty-state {
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.15);
    color: var(--text-soft);
}

@media (max-width: 991px) {
    .hero-panel {
        padding: 1.5rem;
    }

    .navbar .btn {
        margin-top: 8px;
    }
}

.table,
.table * {
    color: var(--text-main) !important;
}

.table thead th {
    color: #dff4ff !important;
    font-weight: 700;
}

.table tbody td {
    color: #f4fbff !important;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04) !important;
}

.table td .btn,
.table td .btn-outline-secondary,
.table td .btn-outline-primary,
.table td .btn-outline-danger {
    color: #f4fbff !important;
}

.btn-outline-secondary {
    color: #dff4ff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.30) !important;
}

.btn-outline-primary {
    color: #7fe9ff !important;
    border-color: rgba(99, 230, 255, 0.55) !important;
}

.btn-outline-primary:hover {
    background: rgba(99, 230, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(99, 230, 255, 0.75) !important;
}

.btn-outline-danger {
    color: #ff9aac !important;
    border-color: rgba(255, 107, 129, 0.55) !important;
}

.btn-outline-danger:hover {
    background: rgba(255, 107, 129, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 107, 129, 0.75) !important;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-soft);
    margin-bottom: 0;
}

.smart-panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 26px !important;
    box-shadow: var(--shadow-main) !important;
    backdrop-filter: blur(14px);
}

.smart-panel .card-body {
    padding: 1.4rem;
}

.auth-card .card-body {
    padding: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    color: var(--text-soft);
    margin-bottom: 1.5rem;
}

.metric-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metric-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    font-size: 0.92rem;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.info-item strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
}

.recipe-instruction-box {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    white-space: pre-line;
    line-height: 1.7;
}

.status-banner {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 16px;
    font-weight: 600;
}

.status-banner.success {
    background: rgba(42, 197, 139, 0.12);
    border: 1px solid rgba(42, 197, 139, 0.28);
    color: #dffcef;
}

.status-banner.warning {
    background: rgba(255, 191, 71, 0.12);
    border: 1px solid rgba(255, 191, 71, 0.28);
    color: #fff1cb;
}

.status-banner.danger {
    background: rgba(255, 107, 129, 0.12);
    border: 1px solid rgba(255, 107, 129, 0.28);
    color: #ffd9df;
}

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.soft-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 18px 0;
    border: none;
}

.highlight-box {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 230, 255, 0.10), rgba(124, 92, 255, 0.10));
    border: 1px solid rgba(255,255,255,0.10);
}

.table td form {
    margin: 0;
}

@media (max-width: 768px) {
    .action-stack {
        width: 100%;
    }

    .action-stack .btn {
        width: 100%;
    }
}