/* ===================== GLOBAL STYLES ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* ===================== LOGIN PAGE ===================== */
.login-container {
    display: none;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container.active {
    display: flex;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.login-box h2 {
    font-size: 28px;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.login-box p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

#loginForm {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #666;
    user-select: none;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px;
    background: #fee2e2;
    border-radius: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

.login-attempts {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: scale(0.98);
}

.demo-info {
    margin-top: 30px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.demo-info p {
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.password-display {
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    display: inline-block;
    margin-left: 5px;
}

/* ===================== DASHBOARD ===================== */
.dashboard {
    display: none;
}

.dashboard.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 5px;
}

.header-left p {
    color: #666;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}

.logout-btn {
    padding: 12px 25px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.logout-btn:hover {
    background: #dc2626;
}

/* ===================== STATS CARDS ===================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.deposit {
    border-left-color: #10b981;
}

.stat-card.withdrawal {
    border-left-color: #ef4444;
}

.stat-card.balance {
    border-left-color: #3b82f6;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-amount {
    font-size: 32px;
    font-weight: bold;
}

.stat-card.deposit .stat-amount {
    color: #10b981;
}

.stat-card.withdrawal .stat-amount {
    color: #ef4444;
}

.stat-card.balance .stat-amount {
    color: #3b82f6;
}

/* ===================== MAIN CONTENT ===================== */
.content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* ===================== FORM SECTION ===================== */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

#transactionForm {
    display: flex;
    flex-direction: column;
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row textarea {
    resize: vertical;
    min-height: 60px;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.type-btn {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 14px;
}

.type-btn.active {
    color: white;
}

.type-btn.deposit.active {
    background: #10b981;
    border-color: #10b981;
}

.type-btn.withdrawal.active {
    background: #ef4444;
    border-color: #ef4444;
}

/* ===================== TRANSACTIONS SECTION ===================== */
.transactions-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.transactions-section h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.filter-options {
    margin-bottom: 20px;
}

.filter-options input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-options input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.transactions-list {
    max-height: 750px;
    overflow-y: auto;
    padding-right: 10px;
}

.transaction-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
    animation: fadeIn 0.3s ease-out;
}

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

.transaction-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.transaction-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.transaction-badge.deposit {
    background: #10b981;
}

.transaction-badge.withdrawal {
    background: #ef4444;
}

.transaction-amount {
    font-size: 20px;
    font-weight: bold;
}

.transaction-amount.deposit {
    color: #10b981;
}

.transaction-amount.withdrawal {
    color: #ef4444;
}

.transaction-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.detail-value {
    color: #333;
    word-break: break-word;
}

.transaction-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.btn-edit {
    flex: 1;
    padding: 10px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    flex: 1;
    padding: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin-bottom: 10px;
    font-size: 18px;
}

/* ===================== FOOTER ===================== */
.footer {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 30px;
}

/* ===================== SCROLLBAR ===================== */
.transactions-list::-webkit-scrollbar {
    width: 8px;
}

.transactions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.transactions-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.transactions-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .login-box {
        padding: 30px 20px;
    }

    .form-section,
    .transactions-section {
        padding: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-amount {
        font-size: 24px;
    }

    .transaction-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-box {
        padding: 20px;
    }

    .login-box h2 {
        font-size: 22px;
    }

    .header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .stats {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-amount {
        font-size: 20px;
    }

    .content {
        gap: 15px;
    }

    .form-section,
    .transactions-section {
        padding: 15px;
    }

    .transaction-card {
        padding: 15px;
    }
}
