/* --- FONT UTAMA & DASAR --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');


body {
    font-family: 'Inter', sans-serif;
    background-color: #030712; /* Warna dasar yang lebih gelap */
    color: #f9fafb; /* text-gray-50 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Mencegah scroll horizontal di seluruh halaman */
}

/* --- GAYA HALAMAN LOGIN & MODAL FORM --- */
.login-container, .modal-form-container {
  --form-width: 315px;
  --login-box-color: #272727;
  --input-color: #3a3a3a;
  --button-color: #373737;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--login-box-color);
  border-radius: 24px;
  width: calc(var(--form-width) + 1px);
  z-index: 8;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.2),
    0 0 8px rgba(255, 255, 255, 0.1),
    0 0 16px rgba(255, 255, 255, 0.08);
}

.login-container::before, .modal-form-container::before {
  content: "";
  position: absolute;
  inset: -50px;
  z-index: -2;
  background: conic-gradient(
    from 45deg,
    transparent 75%,
    #fff,
    transparent 100%
  );
  animation: spin 4s ease-in-out infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.login-box {
  background: var(--login-box-color);
  border-radius: 24px;
  padding: 28px;
  width: var(--form-width);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    inset 0 40px 60px -8px rgba(255, 255, 255, 0.12),
    inset 4px 0 12px -6px rgba(255, 255, 255, 0.12),
    inset 0 0 12px -4px rgba(255, 255, 255, 0.12);
  /* === PERBAIKAN UNTUK SCROLL MODAL === */
  max-height: 90vh; /* Batasi tinggi maksimal */
  display: flex;
  flex-direction: column;
}

.login-box .form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  /* === PERBAIKAN UNTUK SCROLL MODAL === */
  overflow-y: auto; /* Tambahkan scroll vertikal jika perlu */
  flex-grow: 1; /* Biarkan form mengisi ruang yang tersedia */
  padding-right: 15px; /* Beri ruang untuk scrollbar agar tidak menutupi konten */
  margin-right: -15px; /* Ausgleich für Padding */
}

.login-box .header {
  width: 100%;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  padding: 6px;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0; /* Mencegah header menyusut */
}

.login-box .input {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: var(--input-color);
  color: white;
  outline: none;
  font-size: 14px;
}

.login-box .input:focus {
  border: 1px solid #fff;
}

.login-box .button {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 10px;
  background: var(--button-color);
  color: white;
  transition: 0.3s;
  box-shadow:
    inset 0px 3px 6px -4px rgba(255, 255, 255, 0.6),
    inset 0px -3px 6px -2px rgba(0, 0, 0, 0.8);
}

.login-box .button:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0px 3px 6px rgba(255, 255, 255, 0.6),
    inset 0px -3px 6px rgba(0, 0, 0, 0.8),
    0px 0px 8px rgba(255, 255, 255, 0.05);
}


/* --- GAYA APLIKASI DASBOR --- */

/* --- SCROLLBAR KUSTOM --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #111827; /* bg-gray-900 */
}
::-webkit-scrollbar-thumb {
    background: #374151; /* bg-gray-700 */
    border-radius: 4px;
    border: 2px solid #111827;
}
::-webkit-scrollbar-thumb:hover {
    background: #4f46e5; /* bg-indigo-600 */
}

/* --- SIDEBAR --- */
#sidebar {
    background-color: #1f2937; /* bg-gray-800 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GAYA BARU UNTUK SIDEBAR COLLAPSED === */
#sidebar.collapsed {
    width: 80px;
}
#sidebar.collapsed .sidebar-text {
    display: none;
}
#sidebar.collapsed #sidebar-header-title {
    display: none;
}
#sidebar.collapsed #app-logo {
    display: none;
}
#sidebar.collapsed .sidebar-link {
    justify-content: center;
}
#sidebar.collapsed .sidebar-link svg {
    margin-right: 0;
}
#sidebar.collapsed #sidebar-toggle-desktop svg {
    transform: rotate(180deg);
}
#sidebar.collapsed #logout-btn span {
    display: none;
}
/* === AKHIR GAYA BARU === */

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #9ca3af; /* text-gray-400 */
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
    white-space: nowrap; /* Mencegah teks turun baris */
}
.sidebar-link:hover {
    background-color: rgba(79, 70, 229, 0.1);
    color: #ffffff;
    border-left-color: #4f46e5;
}
.sidebar-link.active {
    background-color: #4f46e5; /* bg-indigo-600 */
    color: #ffffff;
    font-weight: 600;
    border-left-color: #a5b4fc; /* indigo-300 */
}
.sidebar-link svg {
    margin-right: 0.75rem;
    flex-shrink: 0; /* Mencegah ikon menyusut */
}

/* --- KARTU PRODUK (LIST STYLE) --- */
.card {
  width: 100%;
  max-width: 290px;
  height: 70px;
  background: #353535;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: left;
  backdrop-filter: blur(10px);
  transition: 0.5s ease-in-out;
}
.card:hover {
  cursor: pointer;
  transform: scale(1.05);
}
.card .img {
  width: 50px;
  height: 50px;
  margin-left: 10px;
  border-radius: 10px;
  background: linear-gradient(#d7cfcf, #9198e5);
  background-size: cover;
  background-position: center;
}
.card:hover > .img {
  transition: 0.5s ease-in-out;
  background: linear-gradient(#9198e5, #712020);
}
.card .textBox {
  width: calc(100% - 90px);
  margin-left: 10px;
  color: white;
  font-family: 'Poppins', sans-serif;
}
.card .textContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card .span {
  font-size: 10px;
}
.card .h1 {
  font-size: 16px;
  font-weight: bold;
}
.card .p {
  font-size: 12px;
  font-weight: lighter;
}

/* --- FORM & INPUT UMUM (DI LUAR LOGIN) --- */
.input {
    background-color: #111827; /* bg-gray-900 */
    border: 1px solid #4b5563; /* border-gray-600 */
    color: #f3f4f6;
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.65rem 1rem;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
    outline: none;
    border-color: #6366f1; /* indigo-500 */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

/* --- TOMBOL UMUM (DI LUAR LOGIN) --- */
button.bg-indigo-600 {
    background-image: linear-gradient(to right, #4f46e5, #6366f1);
    color: white;
    transition: all 0.2s ease-in-out;
}
button.bg-indigo-600:hover {
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4), 0 4px 6px -4px rgba(79, 70, 229, 0.4);
}
button:active {
    transform: scale(0.97);
}


/* --- MODAL UMUM --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.modal.active {
    opacity: 1;
}
.modal > div { /* Konten di dalam modal */
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}
.modal.active > div {
    transform: scale(1);
}
.modal:not(.active) {
    pointer-events: none;
}

/* --- TABEL --- */
table thead {
    border-bottom: 2px solid #4b5563; /* border-gray-600 */
}
table th {
    color: #9ca3af; /* text-gray-400 */
}
table tbody tr {
    transition: background-color 0.2s ease;
}
table tbody tr:hover {
    background-color: #374151; /* bg-gray-700 */
}

/* --- RESPONSIVE LAYOUT --- */
@media (max-width: 767px) {
    main {
        padding: 1rem; /* p-4 */
    }
    #pos-product-list {
        grid-template-columns: 1fr !important;
    }
    .card {
        max-width: 100%;
    }
    #sidebar.mobile-visible {
        transform: translateX(0);
    }
}
.payment-method-btn {
    padding: 8px;
    border: 1px solid #4a5568; /* border-gray-600 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.875rem; /* text-sm */
    color: #cbd5e0; /* text-gray-300 */
    transition: all 0.2s ease-in-out;
}

.payment-method-btn:hover {
    background-color: #4a5568; /* bg-gray-600 */
}

.payment-method-btn.active {
    background-color: #4c51bf; /* bg-indigo-600 */
    border-color: #4c51bf; /* border-indigo-600 */
    color: white;
    font-weight: bold;
}