@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

a {
    text-decoration: none !important;
}



/* Reset dan styling dasar */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #eef1f5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-logo {
    height: 40px;
    margin-right: 15px;
}

.header-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
}

.container {
    margin: 30px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    flex-grow: 1;
}

h2 {
    color: #2c3e50;
    border-bottom: 2px solid #eef1f5;
    padding-bottom: 10px;
    font-weight: 600;
    margin-bottom: 25px;
}

.summary-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.summary-card i {
    color: #3498db;
}

.card-total {
    border-left: 5px solid #3498db;
}

.card-up {
    border-left: 5px solid #2ecc71;
}

.card-down {
    border-left: 5px solid #e74c3c;
}

.card-up i {
    color: #2ecc71;
}

.card-down i {
    color: #e74c3c;
}

.summary-card h3 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
    color: #2c3e50;
}

.summary-card p {
    margin: 0;
    font-size: 0.9em;
    color: #7f8c8d;
}

.card-content {
    text-align: left;
}

.summary-card h3 {
    margin: 0;
    font-size: 2em;
}

.summary-card p {
    margin: 5px 0 0;
    font-size: 0.9em;
}

.icon-status-up {
    color: #28a745;
}

.icon-status-down {
    color: #dc3545;
}

.btn-refresh {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    white-space: nowrap;
}

.btn-refresh:hover {
    background-color: #0056b3;
}

.response-time-ok {
    color: #28a745;
}

.response-time-slow {
    color: #ffc107;
}

.response-time-critical {
    color: #dc3545;
}

.status-box-up,
.status-box-down {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-box-up {
    background-color: #e6f9f0;
    color: #2ecc71;
}

.status-box-down {
    background-color: #fde8e8;
    color: #e74c3c;
}

.status-box-up i,
.status-box-down i {
    font-size: 0.9em;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-refresh {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-refresh:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-refresh i {
    margin-right: 5px;
}

.response-time-ok {
    color: #2ecc71;
    font-weight: 600;
}

.response-time-slow {
    color: #f1c40f;
    font-weight: 600;
}

.response-time-critical {
    color: #e74c3c;
    font-weight: 600;
}

footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    margin-top: 30px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Tampilan Card --- */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.status-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef1f5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.status-card .status-header {
    display: flex;
    margin-bottom: 15px;
    gap: 12px;
    flex-direction: column-reverse;
}

.status-card .card-domain-info {
    flex-grow: 1;
    word-break: break-all;
}

.status-card .domain-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #34495e;
    overflow-wrap: anywhere;
}

.status-card .domain-url {
    font-size: 0.8em;
    color: #7f8c8d;
    word-break: break-all;
}

.status-card .status-indicator {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    /* Minimal lebar untuk konsistensi */
    justify-content: center;
}

.status-card .up {
    background-color: #e6f9f0;
    color: #2ecc71;
}

.status-card .down {
    background-color: #fde8e8;
    color: #e74c3c;
}

.status-card .status-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.status-card .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #eef1f5;
    font-size: 0.9em;
}

.status-card .detail-item:last-child {
    border-bottom: none;
}

.status-card .detail-label {
    color: #7f8c8d;
    font-weight: 500;
}

.status-card .detail-value {
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
}

.btn-refresh-card {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #95a5a6;
    transition: color 0.3s ease;
    position: static;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.btn-refresh-card:hover {
    color: #3498db;
}

/* --- Tampilan Tabel --- */
.status-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.status-table th,
.status-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f4f7;
}

.status-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.9em;
}

.hidden {
    display: none !important;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .wrap-btn-main-function {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }

    #summary {
        width: 100%;
    }

    #refresh-all-btn,
    #toggle-view-btn {
        width: 100%;
    }

    .container {
        padding: 20px;
        margin: 15px;
    }

    .summary-box {
        grid-template-columns: 1fr;
    }

    .summary-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .card-content {
        text-align: center;
    }

    /* Ini perbaikan untuk menghilangkan tampilan tabel responsif */
    .status-table,
    .status-table thead,
    .status-table tbody,
    .status-table th,
    .status-table td,
    .status-table tr {
        display: block;
        width: auto !important;
        position: static !important;
    }

    .status-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .status-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 5px;
        border-radius: 8px;
    }

    .status-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 8px;
    }

    .status-table td:before {
        content: attr(data-label);
        position: static;
        font-weight: bold;
        white-space: nowrap;
    }

    .status-table td.domain-cell-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
        margin-bottom: 5px;
    }

    .status-table td.domain-cell-container::before {
        content: 'Domain';
        font-size: 1.1em;
        margin-bottom: 5px;
    }

    /* Card responsive */
    .status-grid {
        grid-template-columns: 1fr;
    }
}


/* Hamburger & Sidebar */
.menu-toggle {
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    left: 20px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    display: none;
    transition: opacity 0.5s ease;
}

.sidebar {
    height: 100%;
    width: 280px;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: -280px;
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-x: hidden;
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    padding-top: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar h2 {
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: none;
    font-weight: 700;
    font-size: 1.4em;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar a {
    padding: 18px 25px;
    text-decoration: none;
    font-size: 1.1em;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    transition: 0.4s ease-in-out;
    border-bottom: none;
    border-left: 5px solid transparent;
}

.sidebar a i {
    margin-right: 20px;
    width: 25px;
    text-align: center;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.sidebar a:hover {
    color: #ffffff;
    background-color: rgba(52, 152, 219, 0.2);
    border-left: 5px solid #3498db;
    transform: translateX(5px);
}

.sidebar .close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sidebar .close-btn:hover {
    color: #e74c3c;
}

.sidebar.active {
    left: 0;
}



@media (max-width: 768px) {
    header {
        justify-content: flex-start;
        padding-left: 60px;
    }

    .sidebar {
        width: 0 !important;
        left: 0 !important;
    }

    .sidebar.active {
        width: 100% !important;
        left: 0 !important;
    }
}