/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* Navigation */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-title a {
  color: white;
  text-decoration: none;
}

.nav-title a:hover {
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-user {
  color: #ecf0f1;
  font-size: 0.9rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

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

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Flash Messages */
.flash {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.flash-notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash-alert {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 2rem;
  color: #2c3e50;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Forms */
.form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 600px;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.error-messages {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.error-messages ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.login-card {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  margin-bottom: 2rem;
  text-align: center;
  color: #2c3e50;
}

.login-form {
  width: 100%;
}

/* Dashboard */
.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  font-size: 2rem;
  color: #2c3e50;
}

.dashboard-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.dashboard-section h3 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.5rem;
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Account Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.account-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: transform 0.2s, box-shadow 0.2s;
}

.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.account-card h4 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.account-card h4 a {
  color: #2c3e50;
  text-decoration: none;
}

.account-card h4 a:hover {
  color: #3498db;
}

.account-owner {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.account-balance {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.account-balance strong {
  color: #27ae60;
}

/* Tables */
.accounts-table,
.transactions-table,
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.accounts-table thead,
.transactions-table thead,
.users-table thead {
  background-color: #2c3e50;
  color: white;
}

.accounts-table th,
.transactions-table th,
.users-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.accounts-table td,
.transactions-table td,
.users-table td {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

.accounts-table tbody tr:hover,
.transactions-table tbody tr:hover,
.users-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-credit {
  background-color: #d4edda;
  color: #155724;
}

.badge-debit {
  background-color: #f8d7da;
  color: #721c24;
}

.badge-parent {
  background-color: #cfe2ff;
  color: #084298;
}

.badge-child {
  background-color: #fff3cd;
  color: #856404;
}

/* Account Details */
.account-details {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.detail-card {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.detail-card h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.detail-card p {
  margin-bottom: 0.5rem;
}

/* Transactions Section */
.transactions-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.section-header h3 {
  margin: 0;
  color: #2c3e50;
}

/* Bootstrap Page */
.bootstrap-container,
.bootstrap-message {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 2rem;
}

.bootstrap-card,
.message-card {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 500px;
}

.bootstrap-card h2,
.message-card h2 {
  margin-bottom: 1rem;
  text-align: center;
  color: #2c3e50;
}

.bootstrap-intro {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.message-card p {
  text-align: center;
  margin-bottom: 1rem;
  color: #7f8c8d;
}

.message-card .btn {
  display: block;
  margin: 1.5rem auto 0;
  text-align: center;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.btn-large {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

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

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

  .main-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .accounts-table,
  .transactions-table,
  .users-table {
    font-size: 0.875rem;
  }

  .accounts-table th,
  .transactions-table th,
  .users-table th,
  .accounts-table td,
  .transactions-table td,
  .users-table td {
    padding: 0.5rem;
  }
}
