.action-links {
  margin: 20px 0;
  text-align: left;
  text-align: center;
}

.action-links a {
  margin-right: 20px;
  text-decoration: none;
  font-weight: bold;
  color: #ffffff;
}

.arrow {
  transition: transform 0.3s ease;
}

.arrow.rotate {
  transform: rotate(90deg);
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.centered-container {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chart-img {
  max-width: 100%;
  height: auto;
}

.content {
  padding: 40px;
  max-width: 800px;
  margin: auto;
}

.cta-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: #2980b9;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.cta-button:hover {
  background: #3498db;
}

.deposits-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  background-color: #fff;
  margin-top: 10px;
  table-layout: auto;
}

.deposits-table td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ccc;
  word-break: break-word;
}

.deposits-table td.actions {
  white-space: nowrap;
  display: flex;
  gap: 10px;
  align-items: center;
}

.deposits-table td.actions form {
  margin: 0;
}

.deposits-table th {
  white-space: nowrap;
  padding: 12px 10px;
  text-align: left;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  font-weight: bold;
}

.deposits-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
}

.extras {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  align-items: center;
  margin: 10px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.extras-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  margin-top: 10px;
  gap: 10px;
}


.extras a {
  color: #fff;
  text-decoration: none;
  align-self: flex-end;
  font-size: 0.85em;
}

.flash {
  border-radius: 5px;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
}

.flash.error {
  color: red;
  background-color: #ffe6e6;
  border: 1px solid red;
  padding: 10px;
  margin: 10px 0;
}

.flash.info {
  color: blue;
  background-color: #cce5ff;
  border: 1px solid blue;
  padding: 10px;
  margin: 10px 0;
}

.flash.success {
  color: green;
  background-color: #e6ffe6;
  border: 1px solid green;
  padding: 10px;
  margin: 10px 0;
}

.flash.warning {
  color: orange;
  background-color: #fff3cd;
  border: 1px solid orange;
  padding: 10px;
  margin: 10px 0;
}

.gmail-card {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ccc;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  flex-direction: column;
  padding: 15px;
}

.gmail-card h2 {
  margin: 0 12px 0 0;
  font-size: 1.2em;
  color: #333;
  white-space: nowrap;
  margin: 10px 0;
  text-align: center;
}

.gmail-card i {
  font-size: 1.8em;
  color: #D44638;
  animation: pulse 2s infinite;
}

.gmail-card.loading {
  pointer-events: none;
  opacity: 0.7;
}

.gmail-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.gmail-card:hover i {
  transform: scale(1.1) rotate(5deg);
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-box input[type="text"],
    .login-box input[type="password"],
    .login-box input[type="submit"] {
  font-size: 1rem;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
}

.modern-login {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 40px;
  border-radius: 15px;
  width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  color: #fff;
  text-align: center;
}

.modern-login h2 {
  margin-bottom: 10px;
  color: #ffff;
  font-size: 1.2rem;
}

.modern-login input::placeholder {
  color: #eee;
}

.modern-login input[type="submit"] {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  background-color: #ffb399;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.modern-login input[type="text"],
.modern-login input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.modern-login p {
  margin-bottom: 20px;
  font-weight: 300;
  font-size: 0.9rem;
}

.nav-header {
  background-color: #2c3e50;
  padding: 10px 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-header nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

.nav-header nav a:hover {
  text-decoration: underline;
}

.page-container {
  max-width: 1200px;
  margin: auto;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  display: inline-flex;
  gap: 6px;
}

.remember-me input[type="checkbox"] {
  margin: 0;
}

.signup-btn {
  background-color: #2ecc71;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.signup-btn:hover {
  background-color: #27ae60;
}

.signup-redirect p {
  margin-bottom: 10px;
  color: #fff;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: 0.4s;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid #ccc;
  border-top: 3px solid #D44638;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.styled-table th {
  background-color: #f2f2f2;
  color: #333;
}

.styled-table th, .styled-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-right: 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  font-weight: bold;
  color: #333;
}

.top-bar {
  text-align: right;
  margin-bottom: 20px;
}

.top-right-nav {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 1000;
}

.top-right-nav a {
  background-color: rgba(52, 152, 219, 0.9);
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  color: white;
}

.top-right-nav a:hover {
  background-color: rgba(41, 128, 185, 0.9);
}

.welcome-section h1 {
  margin: 0;
  padding-bottom: 10px;
  color: #2c3e50;
}

.year-header {
  cursor: pointer;
  background-color: #f9f9f9;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
}

/* DARK MODE STYLES */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .year-header {
    background-color: #1e1e1e;
    color: #ffffff;
    border-bottom: 1px solid #444;
}

body.dark-mode .arrow {
    color: #ffffff;
}

body.dark-mode th {
    background-color: #2c2c2c;
    color: #ffffff;
}

/* Gmail card layout and hover effects */
.gmail-card {
  display: inline-flex;
  align-items: center;
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  max-width: 100%;
}

/* Gmail icon styling with animation */
.gmail-card i {
  font-size: 1.8em;
  color: #D44638;
  animation: pulse 2s infinite;
  transition: transform 0.3s ease;
}

/* Modern Login Styles */
.login-background {
  margin: 0;
  padding: 0;
  background: url('../static/images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {transform: scale(1);}
  50% {transform: scale(1.15);}
}



/* Responsive Login Layout */
@media (max-width: 768px) {
  .modern-login {
        width: 90%;
        padding: 30px 20px;
  }
}

/* Text styling */
.gmail-card h2 {
  margin: 0 12px 0 0;
  font-size: 1.1em;
  color: #333;
  white-space: nowrap;
}

/* Wrapper stays aligned right */
.gmail-card-wrapper {
  text-align: right;
  margin-top: 30px;
  padding: 0 10px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);
}
  50% { transform: scale(1.05);
  }
}
@keyframes spin {
  to {
        transform: rotate(360deg);
  }
}

@keyframes spin {
  to {
        transform: rotate(360deg);
  }
}

a, button, input[type=submit] {
  background-color: #3498db;
  color: white;
  padding: 10px 16px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

a:hover, button:hover, input[type=submit]:hover {
  background-color: #2980b9;
}

body {
  font-family: Arial, sans-serif;
  margin: 40px;
  background-color: #f4f6f8;
  color: #333;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f7fa;
  margin: 0;
  padding: 20px;
}

body.dark-mode .action-links a {
  color: #ffffff;
}

body.dark-mode .card,
body.dark-mode .gmail-card {
  background-color: #1e1e1e;
  border-color: #444;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.08);
}

body.dark-mode .deposits-table {
  background-color: #1f2229;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .deposits-table td {
  background-color: #1f2229;
  color: #eaeaea;
  border-color: #444;
}

body.dark-mode .deposits-table th {
  background-color: #2c2f36;
  color: #ffffff;
  border-color: #444;
}

body.dark-mode .gmail-card h2 {
  color: #ffffff;
}

body.dark-mode .gmail-card i {
  color: #ff4d4d;
}

body.dark-mode .spinner {
  border: 3px solid #555;
  border-top: 3px solid #ff4d4d;
}

body.dark-mode .styled-table {
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.08);
}

body.dark-mode .styled-table td {
  background-color: #1f2229;
  color: #eaeaea;
  border-color: #444;
}

body.dark-mode .styled-table th {
  background-color: #2c2f36;
  color: #ffffff;
  border-color: #444;
}

body.dark-mode .theme-toggle-icon i {
  color: #f39c12;
  /* Brighter yellow for icon */;
}

body.dark-mode .centered-container {
    background-color: #242424;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #ffffff;
}

form {
  margin-top: 20px;
}

h1, h2 {
  color: #2c3e50;
  text-align: center;
}

input, select {
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table, th, td {
  border: 1px solid #ccc;
}

th, td {
  padding: 12px;
  text-align: left;
}

.signup-redirect {
  margin-top: 20px;
  text-align: center;
}

/* Optional: during loading */
.gmail-card.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Responsive support */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid #ccc;
  border-top: 3px solid #D44638;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}


/* Toggle switch */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg);
}

}

@media (max-width: 480px) {
  body.login-background {
        background-size: auto;
}

}

@media screen and (max-width: 600px) {
  .gmail-card-wrapper {
        text-align: center;
  }
}

/* --- Dashboard Summary Layout --- */
.summary-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.summary-container .card {
  flex: 1;
  min-width: 300px;
}

.summary-container .card h1 i {
  color: #ffcc00;
  margin-right: 8px;
}

.savings-summary {
  background: #ffffff;
}

.dark-mode .savings-summary {
  background: #1e293b;
}

/* Optional button styling inside savings section */
.savings-summary .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.savings-summary .btn:hover {
  background-color: #2980b9;
}

.fd-summary span {
  font-weight: bold;
  font-size: 1.1em;
}
/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: #ffffff;
  margin: 15% auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  margin-top: 0;
  color: #333;
  margin-bottom: 20px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #000;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-group button {
  margin-right: 10px;
}

.btn-success {
  background-color: #27ae60;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

/* Dark mode for modal */
body.dark-mode .modal-content {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .modal-content h2 {
  color: #e0e0e0;
}

body.dark-mode .form-group label {
  color: #e0e0e0;
}

body.dark-mode .form-group input {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode .form-group input:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

body.dark-mode .close {
  color: #aaa;
}

body.dark-mode .close:hover,
body.dark-mode .close:focus {
  color: #fff;
}
/* Theme Toggle Icon - ADD THIS TO THE END OF YOUR style.css FILE */

.theme-toggle-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.theme-toggle-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.theme-toggle-icon i {
  color: #fff;
  font-size: 1.3em;
}

body.dark-mode .theme-toggle-icon {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

/* Theme Toggle Icon */
.theme-toggle-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle-icon:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.theme-toggle-icon i {
  font-size: 1.5em;
  color: #f39c12;
  transition: all 0.3s ease;
}

body.dark-mode .theme-toggle-icon {
  background-color: rgba(52, 73, 94, 0.3);
}

body.dark-mode .theme-toggle-icon:hover {
  background-color: rgba(52, 73, 94, 0.5);
}

/* Responsive adjustments for dash insights */
@media (max-width: 768px) {
  .summary-container {
    flex-direction: column;
  }
  
  .summary-container .card {
    min-width: 100%;
  }
}

/* Unified Navigation & Header Buttons */
.app-header, .page-header, .dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 2;
}

.header-center h1, .dashboard-header h1, .page-header h1 {
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
}

@media (max-width: 768px) {
  .app-header, .page-header, .dashboard-header {
    flex-wrap: wrap;
  }
  
  .header-left, .header-right {
    flex: 0 0 auto;
  }
  
  .header-center {
    flex: 1 0 100%;
    order: 3;
    text-align: center;
    margin-top: 10px;
  }
}

.nav-btn, .btn-logout {
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: #4a5568;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  height: auto;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  color: #667eea;
  border-color: #cbd5e0;
}

.btn-logout {
  color: #718096;
}

.btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
  color: #e53e3e;
  border-color: #feb2b2;
  background: #fff5f5;
}

body.dark-mode .nav-btn, body.dark-mode .btn-logout {
  background: #2a2a2a;
  color: #e2e8f0;
  border-color: #4a5568;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

body.dark-mode .nav-btn:hover {
  color: #99aaff;
  border-color: #667eea;
}

body.dark-mode .btn-logout:hover {
  color: #fc8181;
  border-color: #e53e3e;
  background: rgba(229, 62, 62, 0.15);
}