/* =========================
   LOGIN ADMIN
========================= */

.login-body {
    background: #f4f6f9;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.login-card h2 {
    margin-bottom: 5px;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

/* ================= DASHBOARD ================= */

.dashboard-wrapper {
  padding: 24px;
  width: 100%;
  max-width: none;
}

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: #64748b;
    font-size: 14px;
    margin-top: 6px;
}

/* GRID CARD */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}


/* CARD STYLE */
.dashboard-cards .card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.dashboard-cards .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-title {
  display: block;
  font-size: 14px;
  color: #777;
}

.card-value {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  font-weight: bold;
  color: #0d6efd;
}

/* === VARIAN WARNA === */
.card.dokter {
  border-left: 5px solid #16a34a;
}
.card.dokter .card-value {
  color: #16a34a;
}

.card.poliklinik {
  border-left: 5px solid #1e40af;
}
.card.poliklinik .card-value {
  color: #1e40af;
}

.card.berita-total {
  border-left: 5px solid #2563eb;
}
.card.berita-total .card-value {
  color: #2563eb;
}

.card.berita-publish {
  border-left: 5px solid #0d9488;
}
.card.berita-publish .card-value {
  color: #0d9488;
}

.card.berita-draft {
  border-left: 5px solid #f59e0b;
}
.card.berita-draft .card-value {
  color: #f59e0b;
}

.card.pasien {
  border-left: 5px solid #7c3aed;
}
.card.pasien .card-value {
  color: #7c3aed;
}

/* ================= FORM GROUP ================= */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Baris horizontal */
.form-row {
    display: flex;
    gap: 20px;
}

/* Item di dalam baris */
.form-row .clockform {
    flex: 1;
}

/* ================= JAM MULAI/SELESAI ================= */
.clockform input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-btn {
    width: 100%;
    padding: 10px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-btn:hover {
    background: #1565c0;
}

/* Flash Message */
.flash {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.flash-error {
    background: #fdecea;
    color: #c62828;
}

.flash-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ================= LOGO LOGIN ADMIN ================= */
.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo img {
    width:80px;
    max-width: 100%;
}

/* ================= ADMIN FORM ================= */

.admin-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.admin-card {
    background: #ffffff;
    width: 100%;
    max-width: 700px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.admin-page-audit {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.admin-card-audit {
    background: #ffffff;
    width: 100%;
    max-width: 1100px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.admin-card h2 {
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.admin-form .form-group {
    margin-bottom: 18px;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.preview-image {
    display: block;
    margin-top: 10px;
    max-width: 200px;
    border-radius: 4px;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 14px;
}

.btn-primary {
    background: #1e88e5;
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-link {
    line-height: 38px;
    color: #555;
}


/* ================= DASHBOARD STATS ================= */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-card h3 {
    font-size: 28px;
    margin-bottom: 6px;
    color: #1e88e5;
}

.stat-card p {
    font-size: 14px;
    color: #555;
}

/* ================= TOMBOL AKSI ================= */

.aksi {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-inline {
    margin: 0;
}

.btn-action {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

/* Edit */
.btn-edit {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-edit:hover {
    background: #bbdefb;
}

/* Hapus */
.btn-delete {
    background: #fdecea;
    color: #c62828;
}

.btn-delete:hover {
    background: #f9d6d3;
}

/* ================= ADMIN TABLE ================= */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.admin-table th {
    background: #6e87af;
    font-weight: 600;
}

.admin-table tr:hover {
    background: #f9fbfd;
}

td.keterangan {
  max-width: 450px;
  white-space: normal;
  word-break: break-word;
}


/* ====================== 
        BADGE
========================== */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.publish {
    background: #e3f2fd;
    color: #1e88e5;
}

.badge.draft {
    background: #fbe9e7;
    color: #d84315;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #fff;
}

.status-aktif {
  background-color: #28a745;
}

.status-nonaktif {
  background-color: #dc3545;
}

/* ================= ADMIN LAYOUT ================= */

.admin-body {
    background: #f4f6f8;
}

.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-wrapper.collapsed .admin-sidebar {
    width: 70px;
}

.admin-wrapper.collapsed .label {
    display: none;
}

.admin-sidebar a,
.sidebar-parent {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.admin-wrapper.collapsed .admin-sidebar a,
.admin-wrapper.collapsed .sidebar-parent {
    justify-content: center;
}

.admin-wrapper.collapsed .admin-sidebar a::after {
    content: attr(data-title);
    position: absolute;
    left: 80px;
    background: #111;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-5px);
    transition: 0.25s ease;
}

.admin-wrapper.collapsed .admin-sidebar a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.admin-wrapper.collapsed .sidebar-submenu {
    display: none;
}

.admin-wrapper.collapsed .arrow {
    display: none;
}


/* SIDEBAR */
.admin-sidebar {
    width: 240px;
    background: #1e293b;
    padding: 12px 0;
    transition: width 0.35s ease;
}

.admin-sidebar a {
    display: block;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
}

.admin-sidebar a:hover {
    background: #334155;
    color: #fff;
}

.admin-sidebar a.active {
    background: #1e88e5;
    color: #fff;
}

.sidebar-divider {
    margin: 16px 20px 6px;
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}


/* KONTEN */
.admin-content {
    flex: 1;
    padding: 30px;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
}

/* TOPBAR */
.admin-topbar {
    height: 60px;
    background: #9ab8bc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* ================= FLASH MESSAGE ================= */

.flash-wrapper {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.flash-success {
    background: #e6f4ea;
    color: #1b5e20;
    border-left: 4px solid #2e7d32;
}

.flash-error {
    background: #fdecea;
    color: #b71c1c;
    border-left: 4px solid #c62828;
}

.flash.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* ================= ADMIN FORM ================= */
.form-admin {
    max-width: 600px;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-date {
    margin-bottom: 16px;
    width: 20%;
}

.form-khusus {
    margin-bottom: 16px;
    width: 14%;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.form-actions button,
.form-actions a {
    padding: 8px 16px;
}

/* ================= CHECKBOX AKTIF/NONAKTIF ================= */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ===== GROUP MENU SIDEBAR ===== */
.sidebar-group {
    margin-top: 6px;
}

.sidebar-group:hover .arrow,
.sidebar-group.active .arrow {
    margin-right: 4px;
}

/* ===== PARENT MENU SIDEBAR ===== */
.sidebar-item,
.sidebar-parent {
    padding: 12px 16px;
    font-weight: 600;
    color: #cbd5e1;
    transition: background 0.25s ease, color 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-parent .arrow {
    transition: transform 0.35s ease;
    font-size: 14px;
    transition:
        transform 0.35s ease,
        margin-right 0.35s ease;
}

.sidebar-item:hover,
.sidebar-parent:hover {
    background: #334155;
}


/* ===== SUBMENU DEFAULT MENU SIDEBAR ===== */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-left: 40px;
    background: #0f172a;
    transform: translateY(-6px);
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.2s ease,
        padding-left 0.2s ease;
}

.sidebar-submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #cbd5f5;
    font-size: 14px;
    text-decoration: none;
}

.sidebar-submenu a:hover {
    padding-left: 36px;
    color: #fff;
}

.arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

/* ===== DESKTOP: HOVER MENU SIDEBAR ===== */
@media (min-width: 768px) {
    .sidebar-group:hover .sidebar-submenu {
        max-height: 500px; /* cukup besar */
        opacity: 1;
        transform: translateY(0);
    }

    .sidebar-group:hover .sidebar-parent {
    background: #1e293b;
    color: #fff;
    }

    .sidebar-group:hover .arrow {
        transform: rotate(189deg);
    }

    .sidebar-group.active .arrow {
    transform: rotate(90deg);
    }

}


/* Responsive: layar kecil turun ke bawah */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

    .sidebar-group.active .sidebar-submenu {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
    }
