/* ================= GLOBAL RESET & FONT ================= */

/* Set semua elemen box-sizing border-box */
* {
    box-sizing: border-box;
}

/* Import font Poppins */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* ================= GLOBAL BODY STYLE ================= */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #76BAEC, #F7F9FC);
    min-height: 100vh;
    display: block;
    padding: 10px;
    margin: 0;
    overflow-x: hidden;
}

/* Pastikan html dan body bisa scroll penuh */
html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
}

/* ================= TOP BAR ================= */
.top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 10px;
}

/* ================= MENU BAR ================= */
.menu-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 12px;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    height: 50px;
    align-items: center;
}

.logout-bar {
    height: 50px;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* ================= BUTTON STYLE ================= */
.menu-bar button,
.logout-bar button {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.menu-bar button::after,
.logout-bar button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
    transition: all 0.4s ease;
}

.menu-bar button:hover::after,
.logout-bar button:hover::after {
    left: 100%;
}

.menu-bar button:hover,
.logout-bar button:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-radius: 5px;
}

/* ================= DROPDOWN MENU ================= */
.dropdown-menu {
    display: none;
    position: fixed;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 180px;
    list-style: none;
    padding: 5px 0;
    font-size: 11px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.dropdown-menu li:hover {
    background: linear-gradient(to right, #60c6f5, #4a90e2);
    color: #fff;
    transform: translateX(4px);
}

/* ================= MODERN SEARCH CONTAINER ================= */
.search-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    margin-top: 10px;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

/* ================= SEARCH ITEM ================= */
.search-item {
    display: inline-block;
    margin-right: 3px;
    flex-wrap: wrap;
}

.search-item label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
}

/* ================= DATE INPUT ================= */
.search-item input[type="date"] {
    font-size: 12px;
    width: 120px;
    height: 25px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-item input[type="date"]:focus {
    border-color: #60c6f5;
    outline: none;
    box-shadow: 0 0 6px rgba(96, 198, 245, 0.4);
    background: #fefefe;
}

/* ================= SELECT ELEMENTS ================= */
.search-item select {
    font-size: 11px;
    width: 120px;
    height: 25px;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-item select:focus {
    border-color: #60c6f5;
    outline: none;
    box-shadow: 0 0 6px rgba(96, 198, 245, 0.4);
    background: #fefefe;
}

/* ================= NAME / ID INPUT ================= */
.search-item input[type="text"] {
    font-size: 14px;
    width: 150px;
    height: 30px;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-item input[type="text"]:focus {
    border-color: #60c6f5;
    outline: none;
    box-shadow: 0 0 6px rgba(96, 198, 245, 0.4);
    background: #fefefe;
}

/* ================= SEARCH BUTTON ================= */
.search-item #BTCARI {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 25px;
    background: #797a7a;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    margin-top: 25px;
    transition: background 0.3s ease;
}

.search-item #BTCARI:hover {
    background: #5a5a5a;
}

/* ================= BUTTON STYLE ================= */
.search-container button {
    margin-left: auto;
    padding: 9px 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #60c6f5, #007bff);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(96, 198, 245, 0.4);
}

.search-container button:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(96, 198, 245, 0.5);
}

  .status-box {
    width: 60px;
    height: 50px;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    padding: 5px;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .status-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    filter: brightness(1.1);
  }

  .status-box.active {
    outline: 1px solid #cacaca;
    filter: brightness(1.15);
  }

  .status-label {
    font-size: 14px;
    font-weight: bold;
  }

  .status-count {
    font-size: 13px;
  }

/* ================= RADIOLOGIST SELECT ================= */
#CBRADIOLOGIST {
    font-size: 11px;
    width: 185px;
    height: 25px;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#CBRADIOLOGIST:focus {
    border-color: #60c6f5;
    outline: none;
    box-shadow: 0 0 6px rgba(96, 198, 245, 0.4);
    background: #fefefe;
}

/* ================= STATUS BUTTON ================= */
.status-button {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 110px;
    text-align: center;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: 0.3s;
}

.status-button span {
    background: red;
    color: white;
    border-radius: 50%;
    padding: 4px 10px;
    font-size: 12px;
}

/* ================= TABLE ================= */
.table-container {
    margin-top: 10px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    min-width: 0px;
    height: 1000px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    z-index: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-weight: 400;
    font-size: 13px;
}

th {
    background: #f4f4f4;
    font-size: 11px;
    font-weight: 500;
}

/* Responsive mobile (<= 768px) */
@media screen and (max-width: 789px) {
    .search-container {
        flex-wrap: wrap;
        min-width: auto;
        padding: 8px;
        gap: 5px;
    }

    .search-item {
        margin-top: 10px;
        width: auto;
    }

    .search-item input[type="date"],
    .search-item select {
        width: 150px;
    }

    .search-container input,
    .search-container select {
        padding: 4px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 10px;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .search-container input:focus,
    .search-container select:focus {
        border-color: #60c6f5;
        outline: none;
        box-shadow: 0 0 6px rgba(96, 198, 245, 0.4);
        background: #fefefe;
    }

    .search-item #BTCARI {
        width: 40px;
        height: 25px;
        margin-top: 25px;
        font-size: 0;
        position: relative;
    }

    .search-item #BTCARI::before {
        content: "🔍";
        font-size: 19px;
        color: #fff;
    }

    .top-bar {
        flex-direction: row;
        align-items: stretch;
    }

    .menu-bar {
        flex: 1;
        flex-wrap: wrap;
        height: auto;
    }

    .logout-bar {
        width: auto;
        min-width: 80px;
        margin-left: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
    }
}

/* ================= LOGIN BOX ================= */
.login-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    width: 350px;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 10;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.login-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 14px;
    transition: background 0.3s, box-shadow 0.3s;
}

.login-box input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 8px #667eea;
}

.login-box button {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 12px;
    background: #667eea;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
    background: #5a67d8;
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.login-box button:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
