/* =========================================
   Under Water 2 - Modern Fintech UI
   Dark Ocean Theme
   ========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

html, body {
  background: #0a1628;
  color: #e0e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* Color Variables (fintech theme) */
:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0f1e32;
  --bg-tertiary: #162847;
  --accent-teal: #00d4ff;
  --accent-cyan: #00f7ff;
  --accent-blue: #0099ff;
  --success-green: #00d97e;
  --danger-red: #ff4757;
  --warning-orange: #ff9500;
  --text-primary: #e0e8f0;
  --text-secondary: #a8b5c5;
  --border-color: #1a2f4b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ================================
   AUTH SCREEN
   ================================ */
.auth-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a1628 0%, #0f2842 50%, #0a1628 100%);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.auth-screen::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  left: -100px;
  pointer-events: none;
}

.auth-screen::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 153, 255, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px;
  right: -50px;
  pointer-events: none;
}

.auth-card {
  background: rgba(15, 30, 50, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.1);
  padding: 2.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(0, 212, 255, 0.05);
}

.app-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.app-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.auth-toggle {
  display: flex;
  gap: 0;
  margin: 2rem 0 1.5rem 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 2px;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab-active {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-hidden {
  display: none;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-form input {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-teal);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.auth-form input::placeholder {
  color: var(--text-secondary);
}

.auth-error {
  color: var(--danger-red);
  font-size: 0.8rem;
  min-height: 18px;
  margin-top: 0.25rem;
}

.btn {
  padding: 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--success-green) 0%, #00b366 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 217, 126, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 217, 126, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  color: var(--accent-teal);
  border-color: var(--border-color);
  background: rgba(0, 212, 255, 0.05);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-teal);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-link:hover {
  color: var(--accent-cyan);
  text-decoration: none;
}

.btn-link:active {
  opacity: 0.8;
}

/* ================================
   FORM ELEMENTS
   ================================ */
input, select {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(22, 40, 71, 0.6);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-teal);
  background: rgba(22, 40, 71, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

input::placeholder {
  color: var(--text-secondary);
}

.form-error, .form-status {
  font-size: 0.85rem;
  min-height: 20px;
  color: var(--danger-red);
  margin-top: 0.75rem;
}

.form-status.success {
  color: var(--success-green);
}

.form-error:not(:empty) {
  padding: 0.6rem;
  background: rgba(255, 71, 87, 0.1);
  border-left: 3px solid var(--danger-red);
  border-radius: 4px;
}

/* ================================
   APP SHELL
   ================================ */
.app-shell {
  display: flex;
  height: 100vh;
  background: var(--bg-primary);
}

.app-shell-hidden {
  display: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
  display: block;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
  position: fixed;
  left: -100%;
  top: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  z-index: 1001;
  transition: left 0.3s ease-in-out;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--border-color);
}

.sidebar.active {
  left: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding: 0.75rem;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.sidebar-logo-icon {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.sidebar-logo-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  position: relative;
}

.nav-item:hover {
  color: var(--accent-teal);
  background: rgba(0, 212, 255, 0.05);
}

.nav-item-active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 153, 255, 0.1) 100%);
  color: var(--accent-teal);
  border-left: 3px solid var(--accent-teal);
  padding-left: calc(1rem - 3px);
  box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.05);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sidebar-user {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-word;
  line-height: 1.3;
}

/* ================================
   APP HEADER
   ================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.menu-toggle-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.menu-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.3);
}

.app-logo {
  display: none;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.logo-text {
  color: var(--text-primary);
  display: none;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

.main-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.main-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.view {
  display: none;
}

.view-active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* ================================
   CARDS
   ================================ */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.8) 0%, rgba(22, 40, 71, 0.6) 100%);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.15), inset 0 0 12px rgba(0, 212, 255, 0.03);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.card-wide {
  grid-column: span 2;
}

.big-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: -1px;
}

.card.positive .big-number {
  color: var(--success-green);
}

.card.negative .big-number {
  color: var(--danger-red);
}

/* ================================
   DASHBOARD - PRESSURE DAYS
   ================================ */
.simple-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.simple-list li {
  padding: 0.75rem 1rem;
  background: rgba(0, 212, 255, 0.05);
  border-left: 3px solid var(--accent-teal);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  line-height: 1.5;
}

.simple-list li:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateX(4px);
}

.simple-list li strong {
  color: var(--text-primary);
  font-size: 1rem;
}

.simple-list li small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ================================
   CALENDAR
   ================================ */
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calendar-controls .btn {
  padding: 0.6rem 0.9rem;
  font-size: 1.1rem;
  border-radius: 8px;
}

.calendar-month-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
  padding: 1rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 10px;
}

.calendar-summary > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-teal);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: center;
  font-size: 0.85rem;
  background: var(--bg-secondary);
  padding: 0.75rem 2px;
  border-radius: 8px 8px 0 0;
}

.weekday {
  padding: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--bg-secondary);
  padding: 2px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.calendar-day {
  background: rgba(22, 40, 71, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.05);
  padding: 0.75rem;
  min-height: 80px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
  position: relative;
}

.calendar-day:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.1);
}

.calendar-day-empty {
  background: rgba(10, 22, 40, 0.4);
  cursor: default;
  border-color: transparent;
}

.calendar-day-empty:hover {
  background: rgba(10, 22, 40, 0.4);
  border-color: transparent;
  box-shadow: none;
}

.calendar-day-header {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-teal);
  margin: 0;
  padding: 0;
  line-height: 1;
}

.calendar-event-income {
  color: var(--success-green);
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  text-align: center;
  width: 100%;
  line-height: 1.2;
}

.calendar-event-expense {
  color: var(--danger-red);
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  text-align: center;
  width: 100%;
  line-height: 1.2;
}

.day-balance {
  color: var(--accent-teal);
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: auto;
  padding-top: 0.25rem;
  width: 100%;
  text-align: center;
  line-height: 1;
}

/* ================================
   MODAL
   ================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-visible {
  display: flex !important;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.95) 0%, rgba(22, 40, 71, 0.9) 100%);
  border: 1px solid rgba(0, 212, 255, 0.1);
  padding: 2rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-date-info {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(0, 212, 255, 0.05);
  border-left: 3px solid var(--accent-teal);
  border-radius: 6px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem 0.8rem;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--accent-teal);
  background: rgba(0, 212, 255, 0.1);
}

.day-detail-section {
  margin-bottom: 1.5rem;
}

.day-detail-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.day-events {
  margin: 1rem 0;
}

.day-events h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.detail-income {
  color: var(--success-green);
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(0, 217, 126, 0.1);
  border-left: 3px solid var(--success-green);
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.detail-income:hover {
  background: rgba(0, 217, 126, 0.15);
  transform: translateX(4px);
}

.detail-expense {
  color: var(--danger-red);
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(255, 71, 87, 0.1);
  border-left: 3px solid var(--danger-red);
  border-radius: 6px;
  font-size: 0.95rem;
}

.day-totals {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.day-totals p {
  margin: 0.75rem 0;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.day-totals p span:last-child {
  font-weight: 600;
  color: var(--accent-teal);
}

/* ================================
   BADGES
   ================================ */
.badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-income {
  background: rgba(0, 217, 126, 0.15);
  color: var(--success-green);
  border: 1px solid rgba(0, 217, 126, 0.3);
}

.badge-expense {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger-red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

/* ================================
   TABLES
   ================================ */
.data-table {
  width: 100%;
  margin-top: 1.5rem;
  border-collapse: collapse;
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.6) 0%, rgba(22, 40, 71, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.data-table thead {
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 2px solid var(--border-color);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.data-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

.data-table button {
  padding: 0.5rem 0.75rem;
  margin-right: 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.data-table .btn-ghost {
  color: var(--accent-teal);
}

.data-table .btn-ghost:hover {
  background: rgba(0, 212, 255, 0.1);
}

/* ================================
   FORMS
   ================================ */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-col label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ================================
   SETTINGS
   ================================ */
.settings-section {
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.8) 0%, rgba(22, 40, 71, 0.6) 100%);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.settings-section:hover {
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.1);
}

.settings-section h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.settings-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }

  .cards-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .card-wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }

  .app-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .cards-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .calendar-weekdays {
    gap: 1px;
    padding: 0.5rem 1px;
    font-size: 0.75rem;
  }

  .weekday {
    padding: 0.4rem;
    font-size: 0.7rem;
  }

  .calendar-grid {
    gap: 1px;
    padding: 1px;
  }

  .calendar-day {
    padding: 0.5rem;
    min-height: 70px;
  }

  .calendar-day-header {
    font-size: 0.85rem;
  }

  .calendar-event-income,
  .calendar-event-expense {
    font-size: 0.65rem;
  }

  .day-balance {
    font-size: 0.6rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .main-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .big-number {
    font-size: 1.6rem;
  }

  .modal-content {
    max-width: 90vw;
    padding: 1.5rem;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 0.75rem;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
  }

  .app-header {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .menu-toggle-btn {
    padding: 0.5rem 0.6rem;
    font-size: 1rem;
  }

  .app-logo {
    gap: 0.5rem;
  }

  .logo-icon {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .calendar-month-label {
    font-size: 1rem;
  }

  .calendar-summary {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    margin: 1rem 0 1.5rem 0;
  }

  .summary-value {
    font-size: 1.2rem;
  }

  .calendar-weekdays {
    gap: 0px;
    padding: 0.4rem 0px;
    border-radius: 6px 6px 0 0;
    font-size: 0.65rem;
    margin-bottom: 0.75rem;
  }

  .weekday {
    padding: 0.3rem;
    font-size: 0.65rem;
  }

  .calendar-grid {
    gap: 0px;
    padding: 0px;
    border-radius: 0 0 8px 8px;
  }

  .calendar-day {
    padding: 0.3rem;
    min-height: 50px;
    gap: 0.15rem;
  }

  .calendar-day-header {
    font-size: 0.7rem;
  }

  .calendar-event-income,
  .calendar-event-expense {
    font-size: 0.55rem;
  }

  .day-balance {
    font-size: 0.5rem;
  }

  .cards-row {
    gap: 0.6rem;
    margin: 0.8rem 0;
  }

  .card {
    padding: 1rem;
  }

  .big-number {
    font-size: 1.4rem;
  }

  .main-content h2 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }

  .main-content h3 {
    font-size: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
  }

  input, select {
    padding: 0.6rem;
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem;
    font-size: 0.95rem;
  }

  .simple-list li {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .data-table {
    font-size: 0.7rem;
    overflow-x: auto;
    display: block;
  }

  .data-table th,
  .data-table td {
    padding: 0.35rem;
    white-space: nowrap;
  }

  .data-table button {
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
    margin-right: 0.2rem;
  }

  .settings-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .modal-content {
    padding: 1rem;
    max-width: 95vw;
  }

  .auth-card {
    width: 95%;
    padding: 1.5rem;
  }
}

/* ================================
   APP ICONS & LOGOS
   ================================ */
.auth-logo-badge {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 212, 255, 0.15));
}

.sidebar-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: inline-block;
}

.dashboard-header-banner {
  width: 100%;
  margin: 0 0 1.5rem 0;
  padding: 0.5rem 0;
  background: transparent;
  border-radius: 0;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-logo-horizontal {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  filter: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Responsive icon sizing */
@media (max-width: 768px) {
  .auth-logo-badge {
    width: 85px;
    height: 85px;
    margin: 0 auto 1.2rem;
  }

  .dashboard-header-banner {
    margin: 0 0 1.2rem 0;
    padding: 0.4rem 0;
  }

  .dashboard-logo-horizontal {
    max-height: 130px;
  }
}

@media (max-width: 600px) {
  .auth-logo-badge {
    width: 75px;
    height: 75px;
    margin: 0 auto 1rem;
  }

  .dashboard-header-banner {
    margin: 0 0 1rem 0;
    padding: 0.3rem 0;
  }

  .dashboard-logo-horizontal {
    max-height: 110px;
  }

  .sidebar-icon-img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 400px) {
  html, body {
    font-size: 14px;
  }

  .main-content {
    padding: 0.5rem;
    width: 100%;
    max-width: 100vw;
  }

  .app-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .menu-toggle-btn {
    padding: 0.4rem;
    font-size: 0.9rem;
  }

  .calendar-controls {
    margin-bottom: 0.5rem;
  }

  .calendar-controls .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  .calendar-weekdays {
    gap: 0px;
    padding: 0.3rem 0px;
    border-radius: 4px 4px 0 0;
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
  }

  .weekday {
    padding: 0.25rem;
    font-size: 0.6rem;
  }

  .calendar-grid {
    border-radius: 0 0 4px 4px;
  }

  .calendar-day {
    padding: 0.25rem;
    min-height: 45px;
    gap: 0.1rem;
  }

  .calendar-day-header {
    font-size: 0.6rem;
    font-weight: 700;
  }

  .calendar-event-income,
  .calendar-event-expense {
    font-size: 0.5rem;
    font-weight: 600;
  }

  .day-balance {
    font-size: 0.45rem;
  }

  .calendar-summary {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0.5rem 0 0.75rem 0;
    font-size: 0.8rem;
  }

  .summary-value {
    font-size: 1rem;
  }

  .card {
    padding: 0.75rem;
    min-width: 0;
  }

  .big-number {
    font-size: 1.2rem;
  }

  .main-content h2 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }

  .form-row {
    gap: 0.5rem;
    margin: 0.75rem 0;
  }

  .simple-list li {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }

  .modal-content {
    padding: 0.75rem;
    border-radius: 10px;
    max-width: 100vw;
  }

  .modal-close {
    font-size: 1rem;
    top: 0.75rem;
    right: 0.75rem;
  }

  .data-table {
    font-size: 0.65rem;
    overflow-x: auto;
    display: block;
  }

  .data-table th,
  .data-table td {
    padding: 0.3rem;
    white-space: nowrap;
  }

  .settings-section {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

/* ================================
   LIGHT MODE THEME
   ================================ */
html[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8ecf1;
  --accent-teal: #0077b6;
  --accent-cyan: #0096c7;
  --accent-blue: #0077b6;
  --success-green: #06a77d;
  --danger-red: #d62828;
  --warning-orange: #f77f00;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --border-color: #d0d0d0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .auth-screen {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 50%, #f5f7fa 100%);
}

html[data-theme="light"] .auth-screen::before {
  background: radial-gradient(circle, rgba(0, 119, 182, 0.08) 0%, transparent 70%);
}

html[data-theme="light"] .auth-screen::after {
  background: radial-gradient(circle, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
}

html[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 119, 182, 0.15);
}

html[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right: 1px solid #d0d0d0;
}

html[data-theme="light"] .main-content {
  background: #f5f7fa;
}

html[data-theme="light"] .card {
  background: #ffffff;
  border: 1px solid #d0d0d0;
}

html[data-theme="light"] .view {
  background: #f5f7fa;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #ffffff;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

html[data-theme="light"] .modal-content {
  background: #ffffff;
  border: 1px solid #d0d0d0;
}

html[data-theme="light"] .calendar-grid-item {
  background: #ffffff;
  border: 1px solid #d0d0d0;
}

html[data-theme="light"] .calendar-grid-item:hover {
  background: #f0f4f8;
}

/* Theme toggle styles */
.theme-toggle-group {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.theme-option:hover {
  background: var(--bg-tertiary);
}

.theme-option input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

/* ================================
   THEME SWITCH STYLES
   ================================ */
.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.theme-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  min-width: 70px;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 60px;
  height: 32px;
  cursor: pointer;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  display: none;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 32px;
}

.theme-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-switch input:checked + .theme-slider {
  background-color: var(--accent-teal);
}

.theme-switch input:checked + .theme-slider:before {
  transform: translateX(28px);
}

.theme-switch:active .theme-slider:before {
  width: 28px;
}

/* ================================
   LIGHT MODE CALENDAR SPECIFIC
   ================================ */
html[data-theme="light"] .calendar-month-label {
  background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
  color: white;
}

html[data-theme="light"] .calendar-weekdays {
  background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
  color: white;
}

html[data-theme="light"] .weekday {
  color: white;
  font-weight: 600;
}

html[data-theme="light"] .calendar-day {
  background: #ffffff;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
}

html[data-theme="light"] .calendar-day:hover {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.15);
  transform: translateY(-2px);
}

html[data-theme="light"] .calendar-day-header {
  color: #0077b6;
  font-weight: 600;
}

html[data-theme="light"] .calendar-event-income {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #4caf50;
}

html[data-theme="light"] .calendar-event-expense {
  background: #ffebee;
  color: #c62828;
  border-left: 3px solid #f44336;
}

html[data-theme="light"] .day-balance {
  color: #0077b6;
  font-weight: 600;
}

html[data-theme="light"] .calendar-summary {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
}

html[data-theme="light"] .summary-label {
  color: #555555;
}

html[data-theme="light"] .summary-value {
  color: #0077b6;
  font-weight: 700;
}

html[data-theme="light"] .calendar-summary-positive {
  color: #2e7d32;
}

html[data-theme="light"] .calendar-summary-negative {
  color: #c62828;
}

/* Light mode theme label fix */
html[data-theme="light"] .theme-label {
  color: #ffffff;
  font-weight: 600;
}
