/* Kids Bank - Modern Banking Design */

:root {
    --color-primary: #4A90E2;
    --color-success: #5CB85C;
    --color-warning: #FF8C42;
    --color-info: #4A90E2;
    --color-purple: #9B59B6;
    --color-teal-gradient-start: #2DD4BF;
    --color-teal-gradient-end: #14B8A6;
    --color-blue-gradient-start: #6BC2E8;
    --color-blue-gradient-end: #8FD3F4;
    --color-gray-light: #F5F5F5;
    --color-gray-medium: #E8E8E8;
    --color-gray-dark: #666666;
    --color-text-dark: #333333;
    --color-text-light: #999999;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    background-color: #F8F9FA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text-dark);
    padding-top: 0;
}

/* Header Styles */
.kids-bank-header {
    background: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary), #6BC2E8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow-md);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--color-text-light);
    margin: 0;
}


/* Account Balance Cards */
.account-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.account-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: white;
}

.account-card.teal-gradient {
    background: linear-gradient(135deg, var(--color-teal-gradient-start), var(--color-teal-gradient-end));
}

.account-card.blue-gradient {
    background: linear-gradient(135deg, var(--color-blue-gradient-start), var(--color-blue-gradient-end));
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    backdrop-filter: blur(10px);
}

.account-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.account-type {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.account-balance-label {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 1rem;
}

.account-balance {
    font-size: 42px;
    font-weight: 700;
    margin: 0.5rem 0;
}


.account-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    backdrop-filter: blur(10px);
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-button {
    background: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--color-text-dark);
    box-shadow: var(--shadow-sm);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--color-text-dark);
}

.action-button .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.action-button.add-money {
    background: var(--color-success);
}

.action-button.subtract-money {
    background: var(--color-warning);
}

.action-button.view-history {
    background: var(--color-info);
}

.action-button.add-money .icon,
.action-button.subtract-money .icon,
.action-button.view-history .icon {
    background: rgba(255, 255, 255, 0.25);
}

.action-button-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Recent Transactions Section */
.recent-transactions-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

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

.view-all-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.transaction-item:hover {
    background: var(--color-gray-medium);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.transaction-icon.credit {
    background: var(--color-success);
}

.transaction-icon.debit {
    background: var(--color-warning);
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.transaction-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0;
}

.transaction-date {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-success);
}

.transaction-amount.negative {
    color: var(--color-warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-cards-container {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .account-card {
        padding: 1.25rem;
    }
    
    .account-balance {
        font-size: 36px;
    }
}

/* Override Bootstrap defaults */
.container {
    max-width: 1200px;
}

.navbar {
    background: white !important;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.navbar-brand {
    color: var(--color-text-dark) !important;
    font-weight: 700;
}

.nav-link {
    color: var(--color-text-dark) !important;
}

/* Homepage navbar - white background with dark text */
.navbar-home {
    background: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 20px 0;
}

.navbar-home .navbar-brand {
    color: #333 !important;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-home .nav-link {
    color: #333 !important;
    font-weight: 500;
}

.navbar-home .nav-link:hover {
    color: #667eea !important;
}

.navbar-home .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-home .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 33, 33, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Fix for account cards when only one kid */
.account-cards-container:has(> :only-child) {
    max-width: 500px;
}

/* Form Styling */
.form-page-container {
    max-width: 600px;
    margin: 2rem auto;
}

.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-gray-light);
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 0.5rem 0;
}

.form-subtitle {
    font-size: 16px;
    color: var(--color-text-light);
    margin: 0;
}

.balance-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.balance-display-label {
    font-size: 14px;
    color: var(--color-text-light);
}

.balance-display-amount {
    font-size: 20px;
    font-weight: 700;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 16px;
    border: 2px solid var(--color-gray-medium);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-light);
}

.form-text {
    display: block;
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    background: var(--color-gray-light);
    border: 2px solid var(--color-gray-medium);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .form-control:focus {
    border-left: 2px solid var(--color-primary);
}

.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 0.5rem;
}

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

.btn-form {
    padding: 0.875rem 1.75rem;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-form:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn-form-primary {
    background: var(--color-primary);
    color: white;
}

.btn-form-success {
    background: var(--color-success);
    color: white;
}

.btn-form-warning {
    background: var(--color-warning);
    color: white;
}

.btn-form-secondary {
    background: var(--color-gray-medium);
    color: var(--color-text-dark);
}

.btn-form-secondary:hover {
    color: var(--color-text-dark);
}

.alert-form {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.alert-form-danger {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

/* Kid Entry Styling for Signup */
.kid-entry {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--color-gray-medium);
    transition: border-color 0.2s;
}

.kid-entry:hover {
    border-color: var(--color-primary);
}

.kid-entry-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section Dividers */
.form-section-divider {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid var(--color-gray-light);
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-description {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 1.5rem;
}

/* Auth Pages Styling */
.auth-container {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), #6BC2E8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--color-text-light);
    margin: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-light);
}

.auth-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
    color: var(--color-info);
}

/* Expandable button styling */
.btn-expandable {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-expandable:hover {
    color: var(--color-info);
    text-decoration: none;
}

.btn-expandable:focus {
    outline: none;
    box-shadow: none;
}

.btn-expandable .expand-icon {
    transition: transform 0.3s ease;
}

.btn-expandable[aria-expanded="true"] .expand-icon {
    transform: rotate(180deg);
}

