/* StatusApp - centrale CSS voor alle pagina's */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    font-family: 'Geist Mono', 'Fira Mono', 'Menlo', 'Consolas', monospace !important;
    background: #252525 !important;
    color: #fff !important;
    font-size: 16px;
    display: flex;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Geist Mono', 'Fira Mono', 'Menlo', 'Consolas', monospace !important;
    color: #fff;
    font-weight: 400;
}

.container {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
    margin: 0;
}

header {
    display: none !important;
}

table {
    border-radius: 0 !important;
}

.add-btn,
.action-btn {
    font-family: 'Geist Mono', monospace !important;
    background: #363636 !important;
    color: #fff !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 400;
    padding: 8px 16px !important;
    box-shadow: none !important;
    margin: 0 0 10px 0 !important;
    transition: background 0.2s, color 0.2s;
}

.add-btn:hover,
.action-btn:hover {
    background: #444 !important;
    color: #fff !important;
}

.logo-statusapp {
    color: #E8DD90 !important;
    font-size: 40px !important;
    font-family: 'Geist Mono', monospace !important;
    font-weight: 400;
    letter-spacing: 0;
}

.layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100vw;
    min-height: 100vh;
    background: #252525;
    position: relative;
    border-radius: 0;
}

.sidebar {
    flex: 0 0 300px;
    position: relative !important;
    left: unset !important;
    top: unset !important;
    z-index: 10;
    background: #252525 !important;
    box-shadow: 0px 0px 4px rgba(166, 166, 166, 0.25);
    border-radius: 0 32px 32px 0;
    padding: 40px 0 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.sidebar .menu,
.sidebar .websites,
.sidebar .submenu {
    font-family: 'Geist Mono', monospace !important;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 16px;
}

.sidebar .submenu {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 0;
}

.sidebar .submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 300;
    color: #fff;
    margin-bottom: 6px;
    padding-left: 8px;
}

.sidebar .submenu-item .alert-badge {
    background: #E89090;
    color: #222;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: 4px;
    font-weight: bold;
    box-shadow: 0 0 4px #E89090aa;
    text-decoration: none;
}

.sidebar .submenu-item .alert {
    display: none;
}

.sidebar .bottom {
    margin-top: 40px;
    font-size: 16px;
    font-weight: 200;
    color: #fff;
}

.sidebar .bottom .add-btn,
.sidebar .bottom .action-btn {
    width: 216px;
    margin-bottom: 10px;
}

.sidebar .bottom .scan-btn {
    width: 170px;
    margin-bottom: 10px;
}

.main-content {
    flex: 1 1 0%;
    min-width: 0;
    min-height: 100vh;
    max-width: 100vw;
    margin-left: 0 !important;
    padding: 40px 40px 40px 40px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: auto;
    background: none;
}

.card {
    background: #252525;
    box-shadow: 0px 0px 4px rgba(166, 166, 166, 0.25);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.main-table {
    background: #18191a;
    border-radius: 12px;
    padding: 0 0 0 0;
    margin-top: 0;
    box-shadow: 0px 0px 4px rgba(166, 166, 166, 0.15);
}

.main-table th,
.main-table td {
    font-family: 'Geist Mono', monospace !important;
    font-size: 16px;
    color: #fff;
    border: none;
    padding: 12px 16px;
    background: none;
}

.main-table th {
    font-weight: 400;
    color: #fff;
    border-bottom: 1px solid #444;
}

.main-table tr {
    border-bottom: 1px solid #333;
}

.main-table tr:last-child {
    border-bottom: none;
}

.badge {
    display: inline-block;
    border-radius: 8px;
    padding: 2px 12px;
    font-size: 16px;
    font-family: 'Geist Mono', monospace;
    font-weight: 400;
    color: #fff;
    margin-left: 6px;
}

/* Enhanced status code badges with full HTTP range support */
.badge-1xx {
    background: #03DAC6; /* Light Blue-Green for 1xx Informational */
    color: #000;
}

.badge-2xx {
    background: #4CAF50; /* Green for 2xx Success */
    color: #fff;
}

.badge-3xx {
    background: #2196F3; /* Blue for 3xx Redirection */
    color: #fff;
}

.badge-4xx {
    background: #FF9800; /* Orange for 4xx Client Error */
    color: #fff;
}

.badge-5xx {
    background: #F44336; /* Red for 5xx Server Error */
    color: #fff;
}

.badge-unknown {
    background: #9E9E9E; /* Gray for unknown/no data */
    color: #fff;
}

.badge-timeout {
    background: #E65100; /* Dark Orange for timeout */
    color: #fff;
}

/* Legacy specific badges for compatibility */
.badge-404 {
    background: #FF9800; /* Orange for 404 */
    color: #fff;
}

.badge-503 {
    background: #F44336; /* Red for 503 */
    color: #fff;
}

.badge-301 {
    background: #2196F3; /* Blue for 301 */
    color: #fff;
}

.badge-200 {
    background: #4CAF50; /* Green for 200 */
    color: #fff;
}

.alert-box {
    background: none;
    border: 2px solid #E89090;
    border-radius: 8px;
    color: #fff;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-box .ph {
    color: #E89090;
    font-size: 24px;
}

.alert-box strong {
    font-weight: 600;
    font-size: 18px;
}

.alert-box .alert-btn {
    margin-left: auto;
    background: #363636;
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    padding: 8px 18px;
    font-family: 'Geist Mono', monospace;
    cursor: pointer;
}

.alert-box .alert-btn:hover {
    background: #444;
}

body {
    font-family: 'Lato', Arial, sans-serif;
    background: #18191a;
    color: #f5f6fa;
}

.container {
    max-width: 1100px;
    margin: 2em auto;
    background: #232324;
    border-radius: 16px;
    box-shadow: 0 2px 24px #0006;
    padding: 2em;
}

h1 {
    color: #fff;
    margin-bottom: 1em;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.add-btn,
.action-btn {
    margin: 0.5em 0;
    padding: 0.6em 1.4em;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'Lato', Arial, sans-serif;
    box-shadow: 0 2px 8px #0002;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.add-btn:hover,
.action-btn:hover {
    background: #333;
    color: #fff;
}

.add-btn i,
.action-btn i {
    font-size: 1.3em;
}

.action-btn.danger {
    background: #d63939;
    color: #fff;
    border: none;
}

.action-btn.danger:hover {
    background: #fff;
    color: #d63939;
    border: 1px solid #d63939;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 2em;
    background: #232324;
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    border: 1px solid #333;
    padding: 0.7em;
    text-align: left;
}

th {
    background: #232324;
    color: #fff;
    font-weight: 700;
}

td {
    color: #eee;
}

tr:nth-child(even) {
    background: #1a1b1c;
}

tr.clickable {
    cursor: pointer;
    transition: background 0.2s;
}

tr.clickable:hover {
    background: #292a2b;
}

.status-ok {
    color: #4fd18b;
    font-weight: bold;
}

.status-error {
    color: #d63939;
    font-weight: bold;
}

.status-multi {
    color: #fbbf24;
    font-weight: bold;
}

.ph {
    vertical-align: middle;
}

.toast {
    position: fixed;
    bottom: 2em;
    right: 2em;
    background: #232324;
    color: #fff;
    padding: 1em 2em;
    border-radius: 8px;
    box-shadow: 0 2px 16px #0008;
    z-index: 2000;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.7em;
}

.modal-bg {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: #0005;
    z-index: 1000;
}

#sidebarModal {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    max-height: 100dvh;
    width: 400px;
    max-width: 100vw;
    background: #232324;
    color: #fff;
    box-shadow: -4px 0 24px #0008;
    z-index: 2001;
    padding: 2em 2em 2em 2em;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s cubic-bezier(.4, 1.4, .6, 1);
    border-radius: 0 0 0 16px;
}

@media (max-width: 700px) {
    .container {
        padding: 0.5em;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        width: 100%;
    }

    th,
    td {
        box-sizing: border-box;
        width: 100%;
    }

    tr {
        margin-bottom: 1em;
    }

    .actions {
        flex-direction: column;
        gap: 0.3em;
    }

    #sidebarModal {
        width: 100vw;
        max-width: 100vw;
        padding: 1em;
        border-radius: 0;
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #444;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background: #4fd18b;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Animation for spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Disabled button styles */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Scanning status indicator */
.scanning-indicator {
    color: #ffc107;
    font-weight: bold;
}

.scanning-indicator i {
    animation: spin 1s linear infinite;
}