/* --- Base Styles & Resets --- */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-tap-highlight-color: transparent; 
    background-color: #ffffff; 
}

@media (min-width: 1024px) {
    body {
        background-color: #f1f5f9; /* A slightly off-white for desktop background */
    }
}

/* --- Transitions & Animations --- */
button, .nav-btn, .flow-choice-btn, .filter-btn, .transaction-checkbox, .setting-checkbox, #balance-summary-btn, label[for="profile-photo-input"] {
    transition: all 0.25s ease-in-out;
}

button:active, .nav-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

#modal-backdrop {
    transition: opacity 0.3s ease-in-out;
}

#transaction-actions-bar, #settings-actions-bar {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
}
#transaction-actions-bar.active, #settings-actions-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Perbaikan untuk Desktop Action Bar */
@media (min-width: 1024px) {
    #transaction-actions-bar, #settings-actions-bar {
        bottom: 1.25rem; /* 20px */
        left: 15rem; /* 240px, for lg:w-60 sidebar */
        right: 1.25rem; /* 20px */
        padding-left: 1.5rem; /* px-6 */
        padding-right: 1.5rem; /* px-6 */
        background-color: transparent;
    }
    #transaction-actions-bar > div, #settings-actions-bar > div {
        max-width: none; /* Override max-w-md */
    }
}
@media (min-width: 1280px) { /* for xl:w-64 sidebar */
     #transaction-actions-bar, #settings-actions-bar {
        left: 16rem; /* 256px */
     }
}


.modal-enter { 
    animation: fadeIn 0.3s ease-out; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

/* --- Component Styles --- */
.custom-scrollbar::-webkit-scrollbar { height: 6px; width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.page { display: none; }
.page.active { display: block; }

.progress-bar-inner { max-width: 100%; }

.rupiah-input-container { position: relative; }
.rupiah-input-container .rp-prefix { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #475569; font-weight: 500; }
.rupiah-input-container input { padding-left: 3.5rem !important; text-align: right; }

.h-dvh { height: 100vh; height: 100dvh; }

#lottie-container, #loading-text {
    transition: opacity 0.5s ease-in-out;
}

/* --- New Chart Legend Styles --- */
#category-trend-legend {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-right: 16px;
    padding: 4px 0;
    transition: opacity 0.2s ease;
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}


/* CSS for Login Card */
.card {
  max-width: 320px;
  width: 100%;
  padding: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border-radius: 20px;
}
.card > * {
  margin: 0;
}
.card__title {
  font-size: 23px;
  font-weight: 900;
  color: #000000;
}
.card__content {
  font-size: 13px;
  line-height: 18px;
  color: #333;
}
.card__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card__form input {
  margin-top: 10px;
  outline: 0;
  background: rgb(255, 255, 255);
  box-shadow: transparent 0px 0px 0px 1px inset;
  padding: 0.6em;
  border-radius: 14px;
  border: 1px solid #333;
  color: black;
  text-align: center;
}
.card__form button {
  border: 0;
  background: #111;
  color: #fff;
  padding: 0.68em;
  border-radius: 14px;
  font-weight: bold;
}
.sign-up:hover {
  opacity: 0.8;
}

/* --- New Desktop Styles --- */
@media (min-width: 1024px) {
    .nav-btn.text-black {
        background-color: #0f172a; /* slate-900 */
        color: #ffffff;
    }
    .nav-btn.text-black svg {
        color: #ffffff;
    }
    .nav-btn:not(.text-black):hover {
        background-color: #f1f5f9; /* slate-100 */
        color: #0f172a; /* slate-900 */
    }
}

/* --- Enhanced Login Screen Styles --- */
#login-screen {
  background: #fff;
  animation: fadeIn 0.5s ease-out;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
}

.login-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.login-header {
  margin-bottom: 2rem;
}

.logo-placeholder {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 800;
  color: #000;
  margin: 0 0 0.25rem;
  letter-spacing: -0.025em;
}

.login-subtitle {
  font-size: 1rem;
  color: #666;
  margin: 0;
  font-weight: 400;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  text-align: left;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  height: 1.25rem;
  width: 1.25rem;
  color: #999;
}

.login-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  background: #fafafa;
}

.login-input:focus {
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
  background: white;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: #000;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-button:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.login-button:active {
  transform: translateY(0);
}

.button-icon {
  height: 1.25rem;
  width: 1.25rem;
}

.login-footer {
  margin-top: 2rem;
}

.footer-text {
  font-size: 0.875rem;
  color: #999;
  margin: 0;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.login-card {
  animation: slideUp 0.5s ease-out;
}