/* === PixieBooks V2 Layout === */

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  color: #333;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 200px;
  background: #67699f;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar .logo {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.sidebar nav a {
  color: white;
  text-decoration: none;
  margin-bottom: 1rem;
  display: block;
  font-weight: 500;
}

.sidebar nav a:hover {
  text-decoration: underline;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 15px;
}

.logo-icon {
  width: 28px;
  height: auto;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.dashboard-welcome {
  margin-bottom: 20px;
}

.content {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
  margin-left: 232px;
}

.summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card {
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-align: center;
}

.card.income {
  background: #b1d8fd;
}

.card.expense {
  background: #d3c4e3;
}

.card.profit {
  background: #bce3bc;
}

.card.year-card {
  background: #e7e9f4;
}

.chart-area {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}
.chart-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  align-items: flex-start;
}

.chart-block {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  height: 300px;
}
.chart-wrapper canvas {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1rem;
}


.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filters input,
.filters select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.import-export-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.import-export-btn.purple {
  border-color: #67699f;
}

.import-export-btn.teal {
  border-color: #53aab5;
}

.entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.entry {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.entry:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.entry .amount {
  float: right;
  font-weight: bold;
}

.entry.income .amount {
  color: green;
}

.entry.expense .amount {
  color: #c0392b;
}

.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #67699f;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-2px);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.fab:hover {
  background: #5a5c8a;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-start;
  padding-top: 5rem;
  justify-content: center;
  overflow-y: auto;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}


.card.cogs {
  background: #ffd6a5;
  color: #000; /* optional if the text needs contrast */
}
.donut-area {
  max-width: 400px;
  margin: 2rem auto;
  text-align: center;
}

.chart-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.chart-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  flex: 1 1 300px;
  max-width: 700px;
  min-width: 280px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#summaryChart {
  flex: 2;
  min-width: 400px;
  height: 300px;
}

#donutChart {
  flex: 1;
  min-width: 250px;
  height: 300px;
}
.entry-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.entry-card:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.entry-card .entry-header,
.entry-card .entry-meta,
.entry-card .entry-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entry-card .entry-header {
  font-weight: bold;
}

.entry-card .entry-meta {
  font-size: 0.85rem;
  color: #555;
}

.entry-card .entry-icons {
  font-size: 1.2rem;
  margin-top: 4px;
}

.recurring-icon,
.note-icon {
  cursor: pointer;
  margin-left: 6px;
}

.entry-card .entry-amount.income {
  color: #0a0;
}

.entry-card .entry-amount.expense {
  color: #c0392b;
}
/* Compact entry card tweaks */
.entry-card {
  padding: 0.75rem 1rem;
  gap: 0.3rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.entry-card .entry-header {
  font-size: 1rem;
}

.entry-card .entry-meta {
  font-size: 0.8rem;
}

.entry-card .entry-icons {
  font-size: 1rem;
  margin-top: 2px;
}

.recurring-icon,
.note-icon {
  margin-left: 4px;
  font-size: 1.1rem;
}
.entry-icons .date {
  font-size: 0.7rem;
  color: #666;
}
.modal-content form {
  display: flex;
  flex-direction: column;
}

.modal-content label {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.modal-content textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.modal-actions button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-actions .save-btn {
  background-color: #67699f;
  color: white;
}

.modal-actions .cancel-btn {
  background-color: #53aab5;
  color: white;
}

.modal-actions .save-btn:hover {
  background-color: #4e4f7a;
}

.modal-actions .cancel-btn:hover {
  background-color: #429ca5;
}

.toggle-row {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.toggle-row .switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.toggle-row .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-row .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-row .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-row input:checked + .slider {
  background-color: #53aab5;
}

.toggle-row input:checked + .slider:before {
  transform: translateX(18px);
}
.modal-actions .cancel-btn {
  background-color: #53aab5 !important;
  color: white;
}
#noteModal.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

#noteModal .modal-content {
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  font-family: inherit;
}

#noteModal .modal-title {
  margin-top: 0;
  font-size: 20px;
  font-weight: bold;
}

#noteModal .modal-body {
  margin-top: 12px;
  font-size: 16px;
  color: #000;
}

#noteModal .modal-footer {
  margin-top: 20px;
  text-align: right;
}

#noteModal .btn-cancel {
  background: #67699f;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}
.content {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
  margin-left: 232px;
}

.report-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.report-controls select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 200px;
}

#reportChart {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

#reportSummary {
  margin-bottom: 2rem;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#reportLedger .entry-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.settings-container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fef9ff;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  font-family: 'Poppins', sans-serif;
}

.settings-container h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.settings-container p {
  margin-bottom: 1.5rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.settings-section {
  background: #ffffff;
  padding: 1.5rem;
  border: 1px solid #e1dcec;
  border-radius: 12px;
}

.settings-section h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #67699f;
}

.settings-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.settings-section input[type="radio"],
.settings-section input[type="checkbox"] {
  margin-right: 0.5rem;
}

.settings-section.full-width {
  grid-column: span 2;
}

.template-link {
  color: #53aab5;
  text-decoration: underline;
  font-weight: 500;
}

.import-message {
  margin-top: 0.75rem;
  font-weight: bold;
}

.settings-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.settings-actions .upgrade-link {
  color: #67699f;
  font-weight: bold;
  text-decoration: underline;
}

.settings-actions input[type="submit"] {
  background: #67699f;
  color: #fff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.settings-actions input[type="submit"]:hover {
  background: #57598c;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-actions input[type="submit"] {
    width: 100%;
  }
}
.auth-container {
  max-width: 400px;
  margin: 8vh auto;
  background: #fef9ff;
  border: 1px solid #d3c4e3;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  font-family: 'Lato', sans-serif;
}

.auth-container h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #67699f;
  text-align: center;
}

.auth-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-container input[type="email"],
.auth-container input[type="password"] {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.auth-container button {
  background: #67699f;
  color: white;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-container button:hover {
  background: #57588d;
}

.auth-container p {
  margin-top: 1rem;
  text-align: center;
}

.auth-container a {
  color: #67699f;
  text-decoration: underline;
  font-weight: 500;
}
.logout-message {
  background: #e7e9f4;
  border: 1px solid #d3c4e3;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #444;
  font-size: 0.95rem;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.recurring-toggle {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  cursor: pointer;
}

.recurring-toggle input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}
.recurring-info {
  background: #f8f7fd;
  border-left: 4px solid #6b5aa3;
  padding: 0.75rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  border-radius: 6px;
  color: #333;
}
.success-banner {
  background-color: #d4edda;
  color: #155724;
  font-weight: 600;
  border: 1px solid #c3e6cb;
  padding: 10px 16px;
  border-radius: 6px;
  margin: 1rem auto;
  width: fit-content;
  max-width: 90%;
  text-align: center;
  z-index: 9999;
  position: sticky;
  top: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.receipt-container {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #333;
}

.receipt-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.receipt-status {
  margin-bottom: 0.3rem;
  color: #555;
}

.receipt-upload-link {
  display: inline-block;
  font-size: 0.85rem;
  color: #4b60c2;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.receipt-upload-link:hover {
  text-decoration: underline;
}

#receiptFile {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.receipt-container {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.receipt-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.receipt-upload-link {
  font-size: 0.85rem;
  color: #4b60c2;
  text-decoration: none;
  margin-top: 0.2rem;
  display: inline-block;
}

.receipt-upload-link:hover {
  text-decoration: underline;
}

.receipt-existing {
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.upload-card {
  border: 1px solid #ccc;
  padding: 0.5rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
  font-size: 0.9rem;
}

.upload-thumb img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.upload-file-icon {
  font-size: 2rem;
  padding: 1rem;
}

.upload-meta {
  margin-top: 0.5rem;
}

.upload-meta .linked {
  color: green;
}

.upload-meta .unlinked {
  color: #999;
}
.upload-card {
  transition: box-shadow 0.2s ease;
  cursor: pointer;
}

.upload-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.upload-type {
  font-style: italic;
  color: #666;
}
.receiptDisplay a {
  text-decoration: none;
}
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.form-row select,
.form-row input {
  margin-bottom: 0;
}
/*–– Universal form spacing ––*/
#entryForm label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;      /* tiny gap from label to its field */
}

#entryForm input,
#entryForm select,
#entryForm textarea {
  margin-bottom: 0.3rem;  /* consistent gap under every solo field */
  width: 100%;
  box-sizing: border-box;
}

/* receipt / recurring sections */
#receiptUploadBlock,
.receipt-container,
.toggle-row,
.recurring-info {
  margin-bottom: 0.4rem;
}

.form-row .half {
  flex: 1;
  min-width: 45%;
}
#entryForm > * {
  margin-bottom: 0.25rem;
}
.entry-form-section {
  margin-bottom: 0.75rem;
}
#entryForm select {
  height: 38px;
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1.2;
}
#entryForm > label,
#entryForm > .form-row,
#entryForm > .standalone-row {
  margin-top: 0.4rem;
}
.toggle-label {
  margin-left: 0px;
}
.delete-btn {
  background-color: #e63946;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.9rem;
  cursor: pointer;
}
#recurringToggleWrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.recurring-status-box {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.recurring-status-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.15rem;
}

.recurring-status-text {
  font-size: 0.9rem;
  color: #777;
  line-height: 1.4;
}

.recurring-status-text a {
  color: #67699f;
  font-weight: 500;
  text-decoration: underline;
}