* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #090b0f;
    color: #f5f7fa;
}

.hidden {
    display: none !important;
}

.muted {
    color: #8d96a7;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at top,
            #241018,
            #090b0f 55%
        );
}

.login-card {
    width: 100%;
    max-width: 420px;

    background: #101319;

    border: 1px solid #242832;
    border-radius: 18px;

    padding: 40px;

    box-shadow:
        0 30px 80px rgba(0,0,0,.45);
}

.brand-mark {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #e32636;

    color: white;
    font-weight: 800;
    font-size: 20px;

    margin-bottom: 20px;
}

.brand-mark.small {
    width: 42px;
    height: 42px;

    font-size: 15px;

    margin: 0;
}

.login-card h1 {
    margin-bottom: 5px;
}

label {
    display: block;

    margin-top: 20px;
    margin-bottom: 7px;

    font-size: 14px;

    color: #c5cbd5;
}

input,
textarea {
    width: 100%;

    background: #0b0e13;

    color: white;

    border: 1px solid #2b303a;
    border-radius: 9px;

    padding: 13px 14px;

    outline: none;
}

input:focus,
textarea:focus {
    border-color: #e32636;
}

.primary-btn,
.secondary-btn,
.danger-btn {
    border: 0;
    border-radius: 9px;

    padding: 12px 18px;

    font-weight: 700;
}

.primary-btn {
    background: #e32636;
    color: white;
}

.login-card .primary-btn {
    width: 100%;
    margin-top: 24px;
}

.secondary-btn {
    background: #222731;
    color: white;
}

.danger-btn {
    background: #4b161b;
    color: #ff949d;
}

.error-message {
    color: #ff6f79;

    margin-top: 15px;
    min-height: 20px;
}

.app-shell {
    min-height: 100vh;

    display: grid;
    grid-template-columns: 240px 1fr;
}

.sidebar {
    background: #0d1015;

    border-right: 1px solid #20242c;

    padding: 22px 16px;

    display: flex;
    flex-direction: column;
}

.logo-area {
    display: flex;
    gap: 12px;
    align-items: center;

    padding: 0 8px 28px;
}

.logo-area strong {
    display: block;
}

.logo-area span {
    color: #e32636;
    font-size: 11px;
    letter-spacing: 2px;
}

nav {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.nav-item {
    border: none;
    border-radius: 9px;

    text-align: left;

    padding: 12px 14px;

    background: transparent;

    color: #8d96a7;
}

.nav-item:hover,
.nav-item.active {
    background: #1a1e26;
    color: white;
}

.nav-item.active {
    border-left: 3px solid #e32636;
}

.logout-btn {
    margin-top: auto;

    border: 0;

    background: transparent;
    color: #8d96a7;

    padding: 12px;
    text-align: left;
}

.main-content {
    padding: 30px;

    max-width: 1400px;

    width: 100%;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}

.topbar h2 {
    margin: 0;
}

.topbar p {
    margin: 5px 0 0;
}

.plan-badge {
    background: #251217;

    border: 1px solid #56202a;

    color: #ff626f;

    padding: 8px 12px;

    border-radius: 30px;

    font-size: 12px;
    font-weight: 800;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 22px;
}

.metric-card,
.panel {
    background: #101319;

    border: 1px solid #242832;
    border-radius: 14px;
}

.metric-card {
    padding: 22px;
}

.metric-card span,
.details-grid span,
.keyword-section > span,
.account-grid span {
    color: #8d96a7;

    display: block;

    font-size: 13px;

    margin-bottom: 8px;
}

.metric-card strong {
    font-size: 21px;
}

.panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}

.panel h3 {
    margin-top: 0;
}

.panel h4 {
    font-size: 20px;

    margin: 0 0 22px;
}

.details-grid,
.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 20px;

    margin-bottom: 25px;
}

.keyword-section {
    border-top: 1px solid #242832;

    padding-top: 20px;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.keyword-chip {
    background: #181c23;

    border: 1px solid #2b303a;

    border-radius: 30px;

    padding: 7px 11px;

    font-size: 13px;
}

.toggle-row {
    display: flex;
    align-items: center;

    gap: 10px;

    margin: 20px 0;
}

.toggle-row input {
    width: auto;
}

.form-message {
    margin-top: 15px;
}

.notification-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.connect-box {
    margin-top: 25px;

    padding: 18px;

    background: #0b0e13;

    border: 1px solid #2b303a;
    border-radius: 10px;
}

.connect-box code {
    display: block;

    margin: 15px 0;

    padding: 12px;

    border-radius: 7px;

    background: #191d24;

    color: #ff6975;
}

.empty-state {
    padding: 25px 0;

    color: #8d96a7;
}

@media (max-width: 800px) {

    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;

        border-right: none;
        border-bottom: 1px solid #20242c;
    }

    nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .logout-btn {
        margin-top: 10px;
    }

    .main-content {
        padding: 20px;
    }

    .metrics-grid,
    .details-grid,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .notification-row,
    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.alerts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.alerts-toolbar h3 {
    margin: 0 0 5px;
}

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

.alert-card {
    background: #101319;
    border: 1px solid #242832;
    border-radius: 14px;
    padding: 22px;
    transition: .15s ease;
}

.alert-card:hover {
    border-color: #3a404c;
    transform: translateY(-1px);
}

.alert-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.alert-priority {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
}

.alert-priority.high {
    background: #3b1117;
    color: #ff6975;
}

.alert-priority.medium {
    background: #332510;
    color: #ffc760;
}

.alert-priority.low {
    background: #16202c;
    color: #8fbef5;
}

.alert-time {
    color: #7f8898;
    font-size: 13px;
}

.alert-title {
    font-size: 19px;
    font-weight: 750;
    margin-bottom: 12px;
}

.alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #a7afbc;
    margin-bottom: 17px;
    font-size: 14px;
}

.alert-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
}

.alert-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 17px;
    border-top: 1px solid #242832;
}

.alert-score {
    color: #8d96a7;
    font-size: 14px;
}

.view-gig-btn {
    text-decoration: none;
    display: inline-block;
    background: #e32636;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.status-sent {
    color: #67d391;
}

.status-pending {
    color: #ffc760;
}

@media (max-width: 800px) {
    .alerts-toolbar,
    .alert-top,
    .alert-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

.dashboard-metrics {
    grid-template-columns: repeat(4, 1fr);
}

.metric-card small {
    display: block;
    margin-top: 8px;
    color: #697386;
    font-size: 12px;
}

.metric-card strong {
    display: block;
}

.nav-alerts {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #e32636;
    color: white;

    border-radius: 30px;

    font-size: 11px;
    font-weight: 800;
}

.recent-panel {
    margin-bottom: 22px;
}

.recent-alerts {
    display: grid;
}

.recent-alert {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;

    padding: 18px 0;

    border-top: 1px solid #242832;
}

.recent-alert:first-child {
    border-top: 0;
    padding-top: 0;
}

.recent-alert:last-child {
    padding-bottom: 0;
}

.recent-alert-title {
    font-size: 16px;
    font-weight: 750;

    margin-bottom: 7px;
}

.recent-alert-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;

    color: #8d96a7;

    font-size: 13px;
}

.recent-alert-right {
    text-align: right;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;

    gap: 10px;
}

.recent-score {
    font-size: 13px;
    color: #8d96a7;
}

.mini-view-btn {
    color: #ff6672;

    font-size: 13px;
    font-weight: 750;

    text-decoration: none;
}

.dashboard-scanner-panel {
    margin-bottom: 30px;
}

.scanner-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.scanner-summary-row h4 {
    margin-bottom: 6px;
}

.state-badge {
    display: inline-flex;

    padding: 7px 11px;

    border-radius: 30px;

    background: #10291d;
    color: #63d792;

    font-size: 11px;
    font-weight: 800;
}

.state-badge.paused {
    background: #332510;
    color: #ffc760;
}

.scanner-mini-details {
    display: flex;
    flex-wrap: wrap;

    gap: 25px;

    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid #242832;

    color: #8d96a7;

    font-size: 13px;
}

.scanner-mini-details strong {
    color: white;
}

.live-dot {
    width: 8px;
    height: 8px;

    display: inline-block;

    border-radius: 50%;

    background: #63d792;

    margin-right: 6px;
}

@media (max-width: 1100px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .recent-alert {
        grid-template-columns: 1fr;
    }

    .recent-alert-right {
        text-align: left;
        align-items: flex-start;
    }

    .scanner-summary-row {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Preserve dashboard geometry; new account and scanner controls share its styling. */
.mobile-navigation { display: none; }
select {
    font: inherit;
    width: 100%;
    padding: 12px;
    border: 1px solid #2b303a;
    border-radius: 9px;
    background: #0b0e13;
    color: #fff;
}
.account-banner { padding: 18px; margin-bottom: 20px; background: #251f15; border: 1px solid #5a4828; border-radius: 10px; }
.account-banner button { margin-top: 12px; }
.scanner-card { margin-bottom: 16px; }
.scanner-card p { overflow-wrap: anywhere; }
.scanner-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.alert-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 20px; }
.alert-filters label { flex: 1; min-width: 160px; margin: 0; }
.flagged-keyword { color: #ffd18a; border-color: #67512e; }
button:disabled { opacity: .55; cursor: not-allowed; }
#showRegisterBtn { margin-top: 16px; width: 100%; }
#verificationResult { margin: 18px 0; }
@media (max-width: 800px) {
    .mobile-navigation { display: block; }
    .sidebar nav { display: none; }
    .sidebar .logo-area { padding-bottom: 10px; }
    .sidebar .logout-btn { margin-top: 8px; }
    .alert-filters { align-items: stretch; flex-direction: column; }
    input, textarea, select { font-size: 16px; }
    button { min-height: 44px; }
}
.notification-channel { border-top: 1px solid #242832; padding: 12px 0 18px; }
.notification-channel .toggle-row { margin: 10px 0; }
.notification-channel .secondary-btn { margin-top: 10px; }
#smsBalances { margin-top: 20px; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); }
#deliveryHistory p, #smsCreditHistory p { overflow-wrap: anywhere; padding: 8px 0; border-bottom: 1px solid #242832; }
