/* Banking Interface Styles */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #1e3a8a;
  --accent-color: #10b981;
  --danger-color: #dc2626;
  --warning-color: #f59e0b;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Styles */
.bank-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.bank-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 0.875rem;
  opacity: 0.9;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  opacity: 0.9;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.back-button {
  background-color: var(--accent-color) !important;
  color: white !important;
  font-weight: 600;
  margin-right: 0.5rem;
}

.back-button:hover {
  background-color: #059669 !important;
  color: white !important;
}

.c2-button {
  background-color: var(--danger-color) !important;
  color: white !important;
  font-weight: 600;
  margin-right: 0.5rem;
}

.c2-button:hover {
  background-color: #b91c1c !important;
  color: white !important;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome {
  font-weight: 500;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
  padding: 2rem 0;
  min-height: calc(100vh - 80px);
}

.section {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.section.active {
  display: block;
}

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

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* Dashboard Styles */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.account-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

.account-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.account-number {
  font-family: 'Courier New', monospace;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.account-balance {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.recent-transactions {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.recent-transactions h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.transaction-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-desc {
  font-weight: 500;
}

.transaction-amount {
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.transaction-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Form Styles */
.banking-form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.security-section {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.security-section h4 {
  margin-bottom: 1rem;
  color: #92400e;
}

.submit-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
}

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

/* Cards Section */
.cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.card-details {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.card-visual {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  border-radius: 0.75rem;
  margin-top: 1rem;
  font-family: 'Courier New', monospace;
}

.card-number {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.card-holder {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-expiry {
  font-size: 0.875rem;
  opacity: 0.9;
}

.card-actions {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.action-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}

.action-btn:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.cancel-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  flex: 1;
}

/* Messages */
.message {
  position: fixed;
  top: 100px;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideIn 0.3s ease-out;
}

.message.success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.message.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.close-message {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
}

.close-message:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .bank-header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }

  .transaction-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .modal-actions {
    flex-direction: column;
  }
}

/* Focus and accessibility */
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
  }
}
