:root {
    --primary-color: #2563eb;
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark-color);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.nav-brand svg {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--gray-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Login Container */
.login-container {
    max-width: 450px;
    margin: 4rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.security-badge svg {
    color: var(--success-color);
}

h1 {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--light-color);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-color);
    transition: all 0.3s;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Forms */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #dc2626;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    line-height: 1;
}

/* Messages */
.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dashboard-header h1 {
    text-align: left;
}

.security-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #d1fae5;
    border-radius: 20px;
    font-weight: 600;
    color: #065f46;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
}

.status-indicator.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--gray-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    line-height: 1.2;
}

/* Sidebar */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card */
.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* Lists */
.list-container {
    margin-bottom: 1.5rem;
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.list-item > div:first-child {
    flex: 1;
    min-width: 0;
}

.list-item > strong {
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
    font-size: 0.95rem;
}

.list-item:last-child {
    border-bottom: none;
}

.loading {
    text-align: center;
    color: var(--gray-color);
    padding: 2rem;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    padding: 1.5rem;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: white;
}

.action-btn span {
    font-size: 2rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Accounts Grid */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.account-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.account-card h3 {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.account-balance {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.account-number {
    font-size: 0.875rem;
    opacity: 0.8;
    word-break: break-all;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Transactions */
.transaction-item {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.transaction-type {
    font-weight: 600;
    text-transform: capitalize;
    flex: 1;
    min-width: 0;
}

.transaction-amount {
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 1rem;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--danger-color);
}

.transaction-details {
    font-size: 0.875rem;
    color: var(--gray-color);
    word-wrap: break-word;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--light-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Security Features */
.security-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 8px;
}

.feature-icon {
    font-size: 2rem;
}

.feature-item > div {
    flex: 1;
}

.feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.875rem;
    color: var(--gray-color);
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

/* Security Events */
.security-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-event {
    padding: 1rem;
    border-left: 4px solid var(--warning-color);
    background: #fef3c7;
    border-radius: 8px;
}

.security-event.blocked {
    border-left-color: var(--danger-color);
    background: #fee2e2;
}

.security-event.safe {
    border-left-color: var(--success-color);
    background: #d1fae5;
}

.event-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.event-details {
    font-size: 0.875rem;
    color: var(--gray-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header .btn-primary {
        width: 100%;
    }
}
