* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: #f4f7fb;
    color: #0f172a;
    line-height: 1.45;
}

a {
    text-decoration: none;
    color: inherit
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.page {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 40px
}

.inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto
}

.topnav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topnav .inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
    color: #0f172a;
}

.brand-mark {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, .12);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    color: #475569;
    transition: .2s ease;
}

.nav-links a:hover {
    background: #eff6ff;
    color: #1d4ed8
}

.nav-links a.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
}

.footer {
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.footer .inner {
    padding: 18px 0;
    color: #64748b;
    font-size: 13px;
}

.flash-wrap {
    width: min(1280px, calc(100% - 40px));
    margin: 20px auto 0;
}

.flash {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: .2s ease;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .20);
}

.btn.primary:hover {
    background: #1d4ed8
}

.btn.secondary {
    background: #fff;
    color: #0f172a;
    border-color: #dbe3ef;
}

.btn.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.console-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    height: fit-content;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.sidebar-title {
    margin: 0 0 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    font-weight: 800;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.side-nav a:hover {
    background: #f8fafc
}

.side-nav a.active {
    background: #e0ecff;
    color: #1d4ed8;
}

.panel {
    min-width: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.panel-title h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.1;
}

.panel-title p {
    margin: 0;
    color: #64748b;
    max-width: 780px;
}

.panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.metric .label {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.metric .value {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.section {
    margin-bottom: 24px;
}

.section-title {
    margin-bottom: 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 22px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.service-card h3 {
    margin: 16px 0 10px;
    font-size: 20px;
}

.service-card p {
    margin: 0 0 14px;
    color: #64748b;
}

.service-meta {
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    margin-bottom: 16px;
}

.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.small-btn:hover {
    background: #f8fafc
}

.small-btn.primary {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.active,
.badge.ready {
    background: #e0f2fe;
    color: #0369a1;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.failed {
    background: #fee2e2;
    color: #b91c1c;
}

.badge.scheduled {
    background: #fef3c7;
    color: #92400e;
}

.table-card,
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.card-head {
    padding: 22px 22px 0;
}

.card-head h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.card-head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.card-body {
    padding: 22px;
}

.table-wrap {
    overflow: auto
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}

.table th {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.table tbody tr:hover {
    background: #fafcff
}

.alerts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.alert-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.alert-card h4 {
    margin: 0 0 12px;
    font-size: 16px;
}

.alert-card .big {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
}

.filters {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
}

.fake-input,
.fake-select {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    min-height: 50px;
    padding: 14px 16px;
    color: #64748b;
    display: flex;
    align-items: center;
}

.crumbs {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.crumbs a {
    color: #2563eb
}

.sep {
    color: #94a3b8
}

.service-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.title-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.title-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #e0ecff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.hero-title {
    margin: 0 0 8px;
    font-size: 36px;
    line-height: 1.08;
}

.hero-sub {
    margin: 0;
    color: #64748b;
    max-width: 760px;
}

.service-badge {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .04);
}

.mini {
    display: flex;
    gap: 14px;
    align-items: center;
}

.mini-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mini-icon.blue {
    background: #dbeafe
}

.mini-icon.purple {
    background: #ede9fe
}

.mini-icon.green {
    background: #dcfce7
}

.mini-icon.orange {
    background: #ffedd5
}

.info-card .label {
    margin: 0 0 4px;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.info-card .value {
    margin: 0;
    font-weight: 800;
    font-size: 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
    gap: 24px;
}

.side-stack {
    display: grid;
    gap: 24px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

.req {
    color: #dc2626
}

.optional {
    color: #64748b;
    font-weight: 600
}

.hint {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.dropzone {
    display: block;
    width: 100%;
    border: 1.5px dashed #bfdbfe;
    background: #f8fbff;
    border-radius: 20px;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    transition: .2s ease;
}

.dropzone:hover {
    border-color: #60a5fa;
    background: #f0f7ff;
}

.up {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.ttl {
    font-weight: 800;
    margin-bottom: 4px;
}

.sub {
    color: #64748b;
    font-size: 13px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.result-empty,
.result-failed,
.result-success {
    border-radius: 18px;
    padding: 22px;
}

.result-empty {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.result-failed {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.result-success {
    background: #ecfeff;
    border: 1px solid #bae6fd;
}

.result-success h4,
.result-failed h4,
.result-empty h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.result-success p,
.result-failed p,
.result-empty p {
    margin: 0 0 16px;
    color: #475569;
}

.stats5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    align-items: start;
}

.stats5>div {
    min-width: 0;
}

.stats5 .label {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.stats5 .value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
}

.download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
}

.download-box .meta {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.log-list {
    display: grid;
    gap: 14px;
}

.log-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.log-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
    margin-top: 7px;
    flex: 0 0 auto;
}

.log-dot.failed,
.log-dot.error {
    background: #ef4444
}

.log-dot.warning {
    background: #f59e0b
}

.log-dot.info {
    background: #3b82f6
}

.log-dot.success {
    background: #10b981
}

.help-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
}

.help-list li {
    margin-bottom: 10px;
}

.help-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

input[type=file] {
    display: none
}

.selected-name {
    margin-top: 10px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

.field-error {
    margin-top: 10px;
    color: #b91c1c;
    font-size: 13px;
}

@media (max-width:1100px) {

    .console-wrap,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .summary {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .service-grid {
        grid-template-columns: 1fr
    }

    .alerts {
        grid-template-columns: 1fr
    }

    .filters {
        grid-template-columns: 1fr 1fr
    }

    .stats5 {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width:700px) {

    .page,
    .inner,
    .flash-wrap {
        width: min(100% - 24px, 1280px)
    }

    .topnav .inner {
        min-height: auto;
        padding: 14px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-header,
    .service-header,
    .download-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary,
    .grid-4,
    .filters,
    .stats5 {
        grid-template-columns: 1fr;
    }
}

.toast-stack {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
}

.toast {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
    animation: toastIn .25s ease;
}

.toast-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.toast-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── Loading overlay ─────────────────────────────── */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn .3s ease;
}

.loading-overlay.visible {
    display: flex;
}

.loading-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 44px 48px;
    text-align: center;
    box-shadow: 0 32px 64px rgba(15, 23, 42, .18);
    max-width: 400px;
    width: 90%;
    animation: cardSlideUp .35s ease;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 22px;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spinLoader .8s linear infinite;
}

.loading-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.loading-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

@keyframes overlayFadeIn {
    from { opacity: 0 }
    to   { opacity: 1 }
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(18px) scale(.97) }
    to   { opacity: 1; transform: translateY(0) scale(1) }
}

@keyframes spinLoader {
    to { transform: rotate(360deg) }
}

.nox-text-input{
  width:100%;
  min-height:52px;
  border:1px solid #dbe3ef;
  border-radius:16px;
  padding:14px 16px;
  font-size:14px;
  color:#0f172a;
  background:#fff;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.nox-text-input:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(96,165,250,.15);
}
