* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    margin: 0;
    background: #0b0f14;
    color: #f3f6f9;
    min-height: 100vh;
}

button,
input,
select {
    font: inherit;
}

.hidden {
    display: none !important;
}

.topbar {
    height: 72px;
    padding: 0 32px;

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

    border-bottom: 1px solid #202731;
    background: #0d1218;

    position: sticky;
    top: 0;
    z-index: 20;
}

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

    color: inherit;
    text-decoration: none;
}

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

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

    border-radius: 10px;

    background: #f3f6f9;
    color: #0b0f14;

    font-weight: 800;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

select {
    padding: 9px 12px;

    border: 1px solid #2a333e;
    border-radius: 8px;

    background: #111720;
    color: #f3f6f9;

    font-size: 14px;
}

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

.hero {
    padding: 100px 0 80px;
}

.hero-content {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: #9ba8b7;
    font-size: 14px;
}

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

    flex: 0 0 auto;

    border-radius: 50%;

    background: #46d369;
}

h1 {
    margin: 0;

    font-size: clamp(44px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-text {
    max-width: 650px;

    margin: 28px 0 0;

    color: #9ba8b7;

    font-size: 19px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 12px;

    margin-top: 34px;
}

.button {
    border: 0;
    border-radius: 9px;

    padding: 11px 17px;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    background: #f3f6f9;
    color: #0b0f14;
}

.button-secondary {
    background: #161d26;
    color: #f3f6f9;

    border: 1px solid #2a333e;
}

.full-width {
    width: 100%;
}

.text-button {
    width: 100%;

    margin-top: 18px;

    border: 0;
    background: transparent;

    color: #9ba8b7;

    cursor: pointer;

    font-size: 14px;
}

.text-button:hover {
    color: #f3f6f9;
}

.dashboard-section {
    padding: 70px 0 40px;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 32px;
}

.dashboard-title {
    font-size: clamp(38px, 6vw, 58px);
}

.user-badge {
    padding: 9px 13px;

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

    color: #cbd4de;

    background: #111720;

    white-space: nowrap;
}

.dashboard-card,
.dashboard-preview {
    padding: 34px;

    border: 1px solid #202731;
    border-radius: 16px;

    background: #0e141b;
}

.dashboard-preview {
    margin-top: 30px;
}

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

    gap: 20px;

    margin-bottom: 28px;
}

.section-header h2 {
    margin: 0 0 7px;

    font-size: 24px;
}

.section-header p {
    margin: 0;

    color: #7f8b99;
}

.monitor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

    gap: 20px;

    padding: 18px 20px;

    border: 1px solid #202731;
    border-radius: 12px;

    background: #111720;
}

.monitor-main {
    min-width: 0;
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.monitor-status span {
    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.monitor-status.up {
    color: #62dc83;
}

.monitor-status.up span {
    background: #62dc83;
}

.monitor-status.down {
    color: #ff6f6f;
}

.monitor-status.down span {
    background: #ff6f6f;
}

.monitor-url {
    overflow: hidden;

    color: #f3f6f9;

    font-size: 16px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-meta {
    margin-top: 6px;

    color: #697583;

    font-size: 12px;
}

.delete-button {
    flex: 0 0 auto;

    padding: 8px 11px;

    border: 1px solid #3a2528;
    border-radius: 8px;

    background: #1a1214;
    color: #ff8b8b;

    cursor: pointer;

    font-size: 13px;
}

.delete-button:hover {
    background: #241619;
}

.empty-state {
    padding: 50px 20px;

    text-align: center;

    border: 1px dashed #2a333e;
    border-radius: 12px;
}

.empty-icon {
    width: 44px;
    height: 44px;

    margin: 0 auto 16px;

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

    border-radius: 50%;

    background: #18231c;
    color: #55d878;

    font-size: 20px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;

    color: #7f8b99;
}

.loading-state,
.error-state {
    padding: 35px;

    text-align: center;

    color: #7f8b99;
}

.error-state {
    color: #ff8b8b;
}

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

    gap: 18px;

    padding: 60px 0 100px;
}

.feature-card {
    padding: 26px;

    border: 1px solid #202731;
    border-radius: 14px;

    background: #0e141b;
}

.feature-icon {
    font-size: 24px;

    margin-bottom: 20px;
}

.feature-card h3 {
    margin: 0 0 10px;
}

.feature-card p {
    margin: 0;

    color: #7f8b99;

    line-height: 1.6;
}

footer {
    display: flex;
    justify-content: space-between;

    padding: 24px 32px;

    border-top: 1px solid #202731;

    color: #697583;

    font-size: 13px;
}


/* =========================================================
   MODALS
========================================================= */

.modal {
    position: fixed;
    inset: 0;

    z-index: 100;

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

    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
}

.modal-card {
    position: relative;
    z-index: 1;

    width: min(440px, 100%);

    padding: 32px;

    border: 1px solid #2a333e;
    border-radius: 16px;

    background: #10161e;

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

.modal-card h2 {
    margin: 0 0 8px;

    font-size: 28px;
}

.modal-description {
    margin: 0 0 24px;

    color: #7f8b99;

    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 34px;
    height: 34px;

    border: 0;

    background: transparent;
    color: #7f8b99;

    cursor: pointer;

    font-size: 28px;
    line-height: 1;
}

.modal-close:hover {
    color: #f3f6f9;
}

form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

label {
    margin-top: 7px;

    color: #cbd4de;

    font-size: 13px;
    font-weight: 600;
}

input {
    width: 100%;

    padding: 12px 13px;

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

    outline: none;

    background: #0b1016;
    color: #f3f6f9;

    font-size: 14px;
}

input:focus {
    border-color: #596675;

    box-shadow:
        0 0 0 3px rgba(130, 145, 160, 0.08);
}

input::placeholder {
    color: #596675;
}

form .button {
    margin-top: 13px;
}

.form-message {
    min-height: 20px;

    margin: 14px 0 0;

    color: #ff9a9a;

    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .topbar {
        padding: 0 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-actions .button {
        padding: 9px 11px;
    }

    .container {
        width: min(
            100% - 24px,
            1120px
        );
    }

    .hero {
        padding: 70px 0 50px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-card,
    .dashboard-preview {
        padding: 22px;
    }

    .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .section-header .button {
        width: 100%;
    }

    .monitor-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .delete-button {
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;

        padding-bottom: 60px;
    }

    footer {
        flex-direction: column;
        gap: 8px;

        padding: 20px 16px;
    }

    .modal-card {
        padding: 26px 20px;
    }
}


/* =========================================================
   MAIN NAVIGATION / ABOUT / SOCIAL
========================================================= */

.topbar-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.nav-button:hover {
    background: rgba(127, 127, 127, 0.10);
}

.about-section {
    padding: 24px 0 48px;
}

.about-heading {
    max-width: 820px;
    margin-bottom: 36px;
}

.about-heading h1 {
    margin-top: 14px;
}

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

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 32px 20px 40px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 4px;
}

.footer-social-label {
    font-weight: 600;
}

.footer-social a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-social a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 900px) {

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

}

@media (max-width: 700px) {

    .topbar-left {
        gap: 12px;
        flex-wrap: wrap;
    }

    .main-nav {
        order: 2;
        width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

}



/* SERVERWATCH ACCOUNT */

.account-section {
    margin-top: 10px;
}

.account-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.account-card {
    min-width: 0;
}

.account-card h2 {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.3;
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-top: 1px solid rgba(127, 127, 127, 0.14);
}

.account-row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.account-row span {
    color: #7f8a96;
    font-size: 14px;
}

.account-row strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

@media (max-width: 760px) {

    .account-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 22px;
    }

    .account-row {
        gap: 12px;
    }
}

/* SERVERWATCH DASHBOARD CARDS */

.monitor-card {
    background: var(--card-background, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(127, 127, 127, 0.20));
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 16px;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.monitor-card:hover {
    transform: translateY(-1px);
}

.monitor-card.status-up {
    border-left: 4px solid #3fb950;
}

.monitor-card.status-down {
    border-left: 4px solid #f85149;
}

.monitor-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.monitor-main-info {
    min-width: 0;
    flex: 1;
}

.monitor-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.monitor-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.status-up .monitor-status-dot {
    background: #3fb950;
    box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.12);
}

.status-down .monitor-status-dot {
    background: #f85149;
    box-shadow: 0 0 0 4px rgba(248, 81, 73, 0.12);
}

.monitor-status-label {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-up .monitor-status-label {
    color: #3fb950;
}

.status-down .monitor-status-label {
    color: #f85149;
}

.monitor-url {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 1.05rem;
}

.monitor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.button-danger {
    border: 1px solid rgba(248, 81, 73, 0.45);
    background: transparent;
    color: #f85149;
}

.button-danger:hover {
    background: rgba(248, 81, 73, 0.10);
}

.monitor-created {
    margin-top: 5px;
    color: #7f8a96;
    font-size: 12px;
    line-height: 1.35;
}

.monitor-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.monitor-metric {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.06);
}

.monitor-metric {
    min-width: 0;
    padding: 13px 14px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.06);
}

.monitor-metric-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.78rem;
    opacity: 0.65;
}

.monitor-metric strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
}

.monitor-error {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(248, 81, 73, 0.08);
}

.monitor-error-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f85149;
}

.monitor-error-text {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 0.86rem;
}

.monitor-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    font-size: 0.76rem;
    opacity: 0.55;
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed rgba(127, 127, 127, 0.28);
    border-radius: 16px;
}

.empty-state-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    max-width: 520px;
    margin: 0 auto 20px;
    opacity: 0.7;
}

.monitor-history-overlay {
    z-index: 2000;
}

.monitor-history-modal {
    width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

.monitor-history-subtitle {
    margin: 5px 0 0;
    opacity: 0.65;
    font-size: 0.86rem;
}

.history-table-wrapper {
    overflow-x: auto;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.history-table th,
.history-table td {
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(127, 127, 127, 0.15);
}

.history-table th {
    position: sticky;
    top: 0;
    background: var(--card-background, #111);
    z-index: 1;
    font-weight: 700;
}

.history-status-up {
    color: #3fb950;
    font-weight: 700;
}

.history-status-down {
    color: #f85149;
    font-weight: 700;
}

.history-empty {
    text-align: center !important;
    padding: 30px !important;
    opacity: 0.65;
}

@media (max-width: 850px) {

    .monitor-card-header {
        flex-direction: column;
    }

    .monitor-actions {
        width: 100%;
    }

    .monitor-actions .button {
        flex: 1;
    }

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

@media (max-width: 520px) {

    .monitor-card {
        padding: 16px;
    }

    .monitor-metrics {
        grid-template-columns: 1fr;
    }

    .monitor-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .monitor-actions .button {
        width: 100%;
    }

    .history-table {
        min-width: 760px;
    }
}


/* SERVERWATCH HISTORY TABLE */

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.history-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: #e5e7eb;
    font-size: 13px;
}

.history-table thead th {
    padding: 13px 14px;
    background: rgba(30, 41, 59, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.history-table thead th:first-child {
    border-top-left-radius: 13px;
}

.history-table thead th:last-child {
    border-top-right-radius: 13px;
}

.history-table tbody tr {
    background: rgba(15, 23, 42, 0.96);
    transition: background 0.15s ease;
}

.history-table tbody tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.55);
}

.history-table tbody tr:hover {
    background: rgba(51, 65, 85, 0.72);
}

.history-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    border-right: 1px solid rgba(148, 163, 184, 0.08);
    color: #dbe3ee;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
}

.history-table tbody td:last-child {
    border-right: 0;
}

.history-table tbody tr:last-child td {
    border-bottom: 0;
}

.history-table .history-date {
    width: 30%;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

.history-table .history-status {
    width: 18%;
}

.history-table .history-code {
    width: 16%;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.history-table .history-response {
    width: 18%;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.history-table .history-error {
    width: 18%;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-status-up,
.history-status-down {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 72px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.history-status-up::before,
.history-status-down::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
}

.history-status-up {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.22);
    color: #86efac;
}

.history-status-up::before {
    background: #4ade80;
    box-shadow: 0 0 7px rgba(74, 222, 128, 0.55);
}

.history-status-down {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.24);
    color: #fca5a5;
}

.history-status-down::before {
    background: #f87171;
    box-shadow: 0 0 7px rgba(248, 113, 113, 0.55);
}

.history-empty {
    padding: 32px 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 700px) {
    .history-table-wrapper {
        margin-top: 14px;
        border-radius: 10px;
    }

    .history-table {
        min-width: 680px;
        font-size: 12px;
    }

    .history-table thead th,
    .history-table tbody td {
        padding: 10px 11px;
    }
}


/* SERVERWATCH MONITOR READABILITY */

.monitor-status-code {
    font-size: 13px;
    line-height: 1.35;
}

.monitor-last-check {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    white-space: pre-line;
}




/* SERVERWATCH STATISTICS CSS START */

.statistics-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

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

    padding: 24px;

    background: rgba(0, 0, 0, 0.72);
}

.statistics-dialog {
    width: min(720px, 100%);

    border-radius: 18px;

    padding: 28px;

    background: #111827;
    color: #f9fafb;

    border: 1px solid rgba(255,255,255,0.12);

    box-shadow:
        0 24px 80px rgba(0,0,0,0.45);
}

.statistics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 26px;
}

.statistics-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.6;

    margin-bottom: 7px;
}

.statistics-header h2 {
    margin: 0;

    font-size: 20px;
    line-height: 1.35;

    word-break: break-word;
}

.statistics-close-button {
    width: 38px;
    height: 38px;

    flex: 0 0 auto;

    border: 0;
    border-radius: 10px;

    background: rgba(255,255,255,0.08);
    color: #fff;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;
}

.statistics-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.statistics-card {
    padding: 18px;

    border-radius: 14px;

    background: rgba(255,255,255,0.06);

    border: 1px solid rgba(255,255,255,0.08);
}

.statistics-card span {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;

    opacity: 0.65;
}

.statistics-card strong {
    display: block;

    font-size: 24px;
    line-height: 1.2;
}

@media (max-width: 600px) {

    .statistics-dialog {
        padding: 20px;
    }

    .statistics-grid {
        grid-template-columns: 1fr;
    }

}

/* SERVERWATCH STATISTICS CSS END */


/* SERVERWATCH STATISTICS CHART */

.statistics-chart-section {
    margin-top: 22px;
    padding: 20px;

    border-radius: 16px;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.09);
}

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

    gap: 16px;

    margin-bottom: 14px;
}

.statistics-chart-header h3 {
    margin: 0 0 4px;

    font-size: 16px;
}

.statistics-chart-header span {
    font-size: 12px;

    opacity: 0.55;
}

.statistics-chart-unit {
    font-size: 12px;
    font-weight: 700;

    opacity: 0.55;
}

.statistics-chart {
    width: 100%;
    height: 260px;

    overflow: hidden;

    border-radius: 12px;

    background: rgba(0, 0, 0, 0.16);
}

.statistics-chart svg {
    width: 100%;
    height: 100%;
}

.statistics-grid-line {
    stroke: currentColor;
    stroke-width: 1;

    opacity: 0.10;
}

.statistics-axis-label {
    fill: currentColor;

    font-size: 11px;

    opacity: 0.45;
}

.statistics-chart-line {
    stroke: currentColor;

    stroke-width: 2.5;

    stroke-linecap: round;
    stroke-linejoin: round;

    opacity: 0.85;
}

.statistics-chart-up {
    fill: currentColor;
}

.statistics-chart-down {
    fill: currentColor;

    opacity: 0.45;
}

.statistics-down-line {
    stroke: currentColor;

    stroke-width: 1;

    stroke-dasharray: 4 5;

    opacity: 0.20;
}

.statistics-chart-legend {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-top: 12px;

    font-size: 12px;

    opacity: 0.65;
}

.statistics-chart-legend span {
    display: inline-flex;

    align-items: center;

    gap: 7px;
}

.statistics-legend-up,
.statistics-legend-down {
    display: inline-block;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: currentColor;
}

.statistics-legend-down {
    opacity: 0.45;
}

@media (max-width: 600px) {

    .statistics-chart-section {
        padding: 14px;
    }

    .statistics-chart {
        height: 210px;
    }

    .statistics-chart-header {
        align-items: flex-start;
    }

}


/* SERVERWATCH STATISTICS CHART LAYOUT */

/* SERVERWATCH STATISTICS CHART LAYOUT */

.statistics-dialog {
    width: min(1100px, calc(100vw - 32px));
    max-width: 1100px;
}

.statistics-grid {
    width: 100%;
    margin-bottom: 28px;
}

.statistics-chart-section {
    width: 100%;
    margin-top: 0;
    padding: 24px 24px 28px;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(10, 16, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
}

.statistics-chart-header {
    margin-bottom: 18px;
}

.statistics-chart-header strong {
    display: block;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #ffffff;
}

.statistics-chart-header span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.62);
}

.statistics-chart {
    width: 100%;
    height: 390px;
    display: block;
}

.statistics-chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

.statistics-chart svg text {
    font-size: 13px;
}

.statistics-chart-line {
    stroke-width: 3;
}

.statistics-chart-grid {
    stroke-width: 1;
    opacity: 0.32;
}

.statistics-chart-axis-label {
    font-size: 13px;
    font-weight: 600;
}

.statistics-chart-down {
    stroke-width: 2;
}

.statistics-chart-legend {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
}

.statistics-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.statistics-chart-legend-line {
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.statistics-chart-legend-down {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid currentColor;
    box-sizing: border-box;
}

@media (max-width: 800px) {

    .statistics-dialog {
        width: calc(100vw - 20px);
    }

    .statistics-chart-section {
        padding: 18px 14px 22px;
    }

    .statistics-chart {
        height: 330px;
    }

    .statistics-chart svg text {
        font-size: 11px;
    }

}

@media (max-width: 560px) {

    .statistics-chart {
        height: 280px;
    }

    .statistics-chart-legend {
        gap: 14px;
        flex-wrap: wrap;
    }

}

/* SERVERWATCH STATISTICS MODAL FIX */

/* SERVERWATCH STATISTICS MODAL FIX */

/*
   Keep the Statistics window completely inside the viewport.
   The window itself scrolls vertically when necessary.
*/

.statistics-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;

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

    padding: 16px;
    overflow: hidden;

    z-index: 9999;
}

.statistics-dialog {
    width: min(1000px, calc(100vw - 32px));
    max-width: 1000px;

    max-height: calc(100vh - 32px);

    box-sizing: border-box;

    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;

    position: relative;
}

.statistics-header {
    position: relative;
}

.statistics-grid {
    width: 100%;
    box-sizing: border-box;

    margin-bottom: 24px;
}

.statistics-chart-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    margin: 0;
}

.statistics-chart {
    width: 100%;
    max-width: 100%;
    height: 360px;
    box-sizing: border-box;
}

.statistics-chart svg {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: block;
}

.statistics-close-button {
    position: relative;
    z-index: 5;
}

@media (max-width: 800px) {

    .statistics-modal {
        padding: 10px;
        align-items: center;
    }

    .statistics-dialog {
        width: calc(100vw - 20px);
        max-width: none;
        max-height: calc(100vh - 20px);
    }

    .statistics-chart {
        height: 320px;
    }
}

@media (max-width: 560px) {

    .statistics-modal {
        padding: 8px;
    }

    .statistics-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .statistics-chart {
        height: 280px;
    }
}

/* SERVERWATCH STATISTICS CHART SEPARATE */

/* SERVERWATCH STATISTICS CHART SEPARATE */

/*
   Statistics cards stay compact at the top.
   Response-history chart becomes a separate wide section below them.
*/

.statistics-dialog {
    width: min(1000px, calc(100vw - 32px));
    max-width: 1000px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;

    width: 100%;
    margin-bottom: 26px;
}

.statistics-chart-section {
    display: block;

    width: 100%;
    min-width: 0;
    max-width: none;

    box-sizing: border-box;

    margin: 0;
    padding: 24px 26px 26px;

    border-radius: 14px;

    background: rgba(10, 16, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);

    overflow: hidden;
}

.statistics-chart-header {
    display: block;

    width: 100%;
    margin: 0 0 20px;
}

.statistics-chart-header strong {
    display: block;

    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;

    color: #ffffff;
}

.statistics-chart-header span {
    display: block;

    margin-top: 6px;

    font-size: 13px;
    line-height: 1.45;

    color: rgba(255, 255, 255, 0.62);
}

.statistics-chart {
    display: block;

    width: 100%;
    min-width: 0;

    height: 380px;

    box-sizing: border-box;
}

.statistics-chart svg {
    display: block;

    width: 100%;
    height: 100%;

    min-width: 0;
}

.statistics-chart-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    width: 100%;

    margin-top: 18px;
    padding-top: 14px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);

    gap: 20px;
}

@media (max-width: 900px) {

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

    .statistics-chart-section {
        padding: 22px 20px 24px;
    }

    .statistics-chart {
        height: 360px;
    }
}

@media (max-width: 560px) {

    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .statistics-chart-section {
        padding: 18px 14px 20px;
    }

    .statistics-chart {
        height: 300px;
    }

    .statistics-chart-header strong {
        font-size: 17px;
    }
}

/* SERVERWATCH STATISTICS CHART FULL ROW */

/* SERVERWATCH STATISTICS CHART FULL ROW */

/*
   The chart section is inside .statistics-grid.
   Make it span the complete grid width instead of one card column.
*/

.statistics-grid .statistics-chart-section {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
}

@media (max-width: 900px) {

    .statistics-grid .statistics-chart-section {
        grid-column: 1 / -1;
    }

}


/* SERVERWATCH STATISTICS PERIOD SELECTOR CSS */

.statistics-period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.statistics-period-button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.statistics-period-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.20);
}

.statistics-period-button.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    font-weight: 600;
}

.statistics-chart-range {
    display: block;
    margin-top: 4px;
    opacity: 0.65;
    font-size: 12px;
}

@media (max-width: 700px) {

    .statistics-period-selector {
        gap: 6px;
    }

    .statistics-period-button {
        padding: 7px 10px;
        font-size: 12px;
    }

}


/* SERVERWATCH STATISTICS PERIODS I18N CSS */

/* Statistics period selector */

.statistics-period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px 0;
}

.statistics-period-button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.statistics-period-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

.statistics-period-button.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.30);
    font-weight: 600;
}

/* Chart heading */

.statistics-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.statistics-chart-header h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.statistics-chart-header span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.65;
}

.statistics-chart-unit {
    flex-shrink: 0;
    font-size: 12px;
    opacity: 0.65;
}

@media (max-width: 700px) {

    .statistics-period-selector {
        gap: 6px;
    }

    .statistics-period-button {
        padding: 7px 10px;
        font-size: 12px;
    }

}

/* SERVERWATCH MONITOR NAME */

.monitor-name {
    margin: 0 0 4px 0;
    overflow: hidden;

    color: #f3f6f9;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-main-info .monitor-url {
    margin: 0;

    color: #9aa4ad;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}



/* =========================================================
   BILLING
========================================================= */

.billing-card {
    margin-bottom: 18px;
}

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

.billing-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #7f8b99;
    font-size: 13px;
    font-weight: 600;
}

.billing-header h2 {
    margin: 0 0 7px;
    font-size: 24px;
}

.billing-header p {
    margin: 0;
    color: #7f8b99;
    line-height: 1.5;
}

.billing-status {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #2a333e;
    border-radius: 8px;
    background: #111720;
    color: #cbd4de;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.billing-status.billing-active {
    border-color: rgba(63, 185, 80, 0.35);
    background: rgba(63, 185, 80, 0.08);
    color: #62dc83;
}

.billing-status.billing-expired {
    border-color: rgba(248, 81, 73, 0.35);
    background: rgba(248, 81, 73, 0.08);
    color: #f85149;
}

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

.billing-stat {
    padding: 16px;
    border: 1px solid rgba(127, 127, 127, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
}

.billing-stat span {
    display: block;
    margin-bottom: 7px;
    color: #7f8b99;
    font-size: 12px;
}

.billing-stat strong {
    display: block;
    color: #f3f6f9;
    font-size: 17px;
}

.billing-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.billing-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border-top: 1px solid rgba(127, 127, 127, 0.12);
    color: #9ba8b7;
    font-size: 13px;
}

.billing-plan strong {
    color: #f3f6f9;
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 760px) {

    .billing-header {
        flex-direction: column;
    }

    .billing-status {
        align-self: flex-start;
    }

    .billing-grid,
    .billing-plans {
        grid-template-columns: 1fr;
    }

    .billing-plan {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =========================================================
   MONITOR PAYMENT REQUIRED
========================================================= */

.monitor-payment-required {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 13px 14px;
    border: 1px solid rgba(210, 153, 34, 0.35);
    border-radius: 10px;
    background: rgba(210, 153, 34, 0.07);
}

.monitor-payment-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(210, 153, 34, 0.14);
    color: #d8a63a;
    font-weight: 800;
    font-size: 15px;
}

.monitor-payment-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.monitor-payment-content strong {
    color: #e5c36b;
    font-size: 13px;
}

.monitor-payment-content span {
    color: #9ba8b7;
    font-size: 12px;
    line-height: 1.4;
}

.monitor-payment-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 760px) {

    .monitor-payment-required {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .monitor-payment-content {
        flex-basis: calc(100% - 46px);
    }

    .monitor-payment-button {
        width: 100%;
        margin-top: 4px;
    }
}

/* =========================================================
   BILLING PAYMENT MODAL
========================================================= */

.billing-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.billing-payment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(5px);
}

.billing-payment-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid rgba(127, 127, 127, 0.2);
    border-radius: 16px;
    background: #111720;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.billing-payment-close {
    position: absolute;
    top: 13px;
    right: 15px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8b98a8;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.billing-payment-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f3f6f9;
}

.billing-payment-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(63, 185, 80, 0.1);
    color: #62dc83;
    font-size: 20px;
    font-weight: 800;
}

.billing-payment-card h2 {
    margin: 0 0 8px;
    color: #f3f6f9;
    font-size: 23px;
}

.billing-payment-description {
    margin: 0 0 22px;
    color: #8996a6;
    line-height: 1.5;
    font-size: 13px;
}

.billing-payment-monitor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 14px;
    border: 1px solid rgba(127, 127, 127, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.billing-payment-monitor span {
    color: #7f8b99;
    font-size: 12px;
}

.billing-payment-monitor strong {
    max-width: 65%;
    overflow: hidden;
    color: #e8edf2;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-payment-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 2px 15px;
}

.billing-payment-price span {
    color: #9ba8b7;
    font-size: 13px;
}

.billing-payment-price strong {
    color: #f3f6f9;
    font-size: 23px;
}

.billing-payment-price small {
    color: #7f8b99;
    font-size: 12px;
    font-weight: 500;
}

.billing-payment-free {
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 9px;
    background: rgba(63, 185, 80, 0.07);
    color: #8fdca1;
    font-size: 12px;
    line-height: 1.45;
}

.billing-payment-notice {
    margin-bottom: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(210, 153, 34, 0.25);
    border-radius: 9px;
    background: rgba(210, 153, 34, 0.07);
    color: #d8b866;
    font-size: 12px;
    line-height: 1.45;
}

.billing-payment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.billing-payment-actions .button {
    min-width: 110px;
}

@media (max-width: 520px) {

    .billing-payment-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .billing-payment-card {
        width: 100%;
        padding: 24px 20px;
        border-radius: 15px;
    }

    .billing-payment-actions {
        flex-direction: column-reverse;
    }

    .billing-payment-actions .button {
        width: 100%;
    }
}
