/* 
 * PWA Cüzdan - Genel Stil Dosyası 
 */

:root { 
    --primary: #3498db; 
    --success: #27ae60; 
    --danger: #e74c3c; 
    --bg: #f4f7f6; 
    --text: #2c3e50;
    --admin-dark: #2c3e50; 
    --admin-blue: #34495e; 
    --accent: #3498db; 
}

/* Base Body Styles */
body { 
    font-family: 'Inter', 'Segoe UI', sans-serif; 
    background: var(--bg); 
    margin: 0; 
    color: #333; 
}

/* Auth pages specific layout */
body.auth-page {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

body.admin-bg {
    background: var(--admin-dark);
}

body.panel-page {
    padding: 20px;
}

body.cashier-page {
    text-align: center;
    background: #f0f2f5;
    padding: 20px;
}

/* Containers */
.container { max-width: 450px; margin: 0 auto; }
.admin-container { max-width: 500px; margin: 0 auto; background: white; padding: 25px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.cashier-container { max-width: 500px; margin: 0 auto; background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* Cards for Auth Pages */
.register-card, .login-card { background: white; padding: 2rem; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0,0,0,0.05); width: 100%; max-width: 400px; box-sizing: border-box; }
.login-card { padding: 2.5rem; border-radius: 1.2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.admin-login-card { background: white; padding: 2.5rem; border-radius: 0.5rem; box-shadow: 0 15px 35px rgba(0,0,0,0.2); width: 100%; max-width: 380px; box-sizing: border-box; }

/* Dashboard Card */
.card { background: white; border-radius: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 20px; text-align: center; }

/* Dashboard Styles */
.balance-label { font-size: 0.9rem; color: #7f8c8d; text-transform: uppercase; letter-spacing: 1px; }
.balance-amount { font-size: 2.5rem; font-weight: bold; color: var(--success); margin: 10px 0; }
#qrcode { display: flex; justify-content: center; margin: 20px 0; padding: 10px; background: white; }
.history-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; text-align: left; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.trx-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f9f9f9; }
.trx-info { text-align: left; }
.trx-type { font-weight: 600; font-size: 0.95rem; }
.trx-date { font-size: 0.8rem; color: #95a5a6; }
.trx-amount { font-weight: bold; }
.type-deposit { color: var(--success); }
.type-payment { color: var(--danger); }
.logout-btn { display: block; text-align: center; color: #95a5a6; text-decoration: none; margin-top: 20px; font-size: 0.9rem; }

/* Typography */
h2 { margin-top: 0; color: var(--text); font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.login-card h2, .register-card h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
p.subtitle { text-align: center; color: #7f8c8d; font-size: 0.9rem; margin-bottom: 2rem; }
.header { text-align: center; margin-bottom: 2rem; border-bottom: 2px solid #f4f7f6; padding-bottom: 1rem; }
.admin-login-card h2, .admin-title { margin: 0; color: var(--admin-dark); font-size: 1.4rem; text-transform: uppercase; letter-spacing: 1px; }

/* Forms */
.form-group { margin-bottom: 1.2rem; text-align: left; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: #666; font-weight: 600;}
.register-card label { font-weight: normal; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"] { 
    width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 0.5rem; box-sizing: border-box; font-size: 1rem; outline: none; transition: all 0.2s; background: #fff; font-family: inherit;
}
.login-card input[type="text"], .login-card input[type="email"], .login-card input[type="password"], .login-card input[type="tel"] {
    padding: 0.9rem; border-radius: 0.6rem;
}
.admin-login-card input[type="text"], .admin-login-card input[type="password"] {
    padding: 0.85rem; border-radius: 0.3rem; background: #f8f9fa; border: 1px solid #ced4da;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="tel"]:focus { 
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); background: #fff;
}
.admin-login-card input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); }

/* Role Selector */
.role-selector { display: flex; gap: 10px; margin-bottom: 1.5rem; background: #f8f9fa; padding: 5px; border-radius: 0.8rem; }
.role-option { flex: 1; text-align: center; }
.role-option input { display: none; }
.role-option label { display: block; padding: 10px; border-radius: 0.6rem; cursor: pointer; margin-bottom: 0; transition: all 0.2s; color: #7f8c8d; font-weight: 400; }
.role-option input:checked + label { background: white; color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.05); font-weight: 600; }

/* Buttons */
.btn-register, .btn-login, .btn-admin-login {
    width: 100%; padding: 1rem; color: white; border: none; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 1rem;
}
.btn-register { background: var(--primary); border-radius: 0.5rem; }
.btn-login { background: var(--primary); border-radius: 0.6rem; font-size: 1rem; margin-top: 0.5rem; }
.btn-admin-login { background: var(--admin-blue); border-radius: 0.3rem; font-size: 0.95rem; }

.btn-register:hover, .btn-login:hover { opacity: 0.9; }
.btn-admin-login:hover { background: #1a252f; }
.btn-login:active { transform: scale(0.98); }

/* Number Inputs (Deposit & Cashier) */
input[type="number"] { width: 100%; padding: 12px; font-size: 1.2rem; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 15px; box-sizing: border-box; }
.cashier-container input[type="number"] { width: 80%; padding: 15px; font-size: 1.5rem; margin-bottom: 20px; border-radius: 10px; }
.btn-submit { width: 100%; padding: 15px; background: var(--success); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-cashier { background: #e74c3c; color: white; border: none; padding: 15px 30px; font-size: 1.1rem; border-radius: 10px; cursor: pointer; width: 100%; display: inline-block; box-sizing: border-box;}

/* Alerts and Links */
.login-link, .footer-links, .back-to-site { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: #7f8c8d; }
.login-link a, .footer-links a, .back-to-site a { text-decoration: none; }
.login-link a, .footer-links a { color: var(--primary); font-weight: 600; }
.back-to-site a { color: #95a5a6; }
.alert { background: #fdeaea; color: #eb4d4b; padding: 10px; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; text-align: center; display: none; }
.alert-admin { background: #fff5f5; color: #c0392b; padding: 10px; border-radius: 0.3rem; margin-bottom: 1.5rem; font-size: 0.85rem; border-left: 4px solid #c0392b; display: block;}

/* Badge */
.badge { display: inline-block; background: #e74c3c; color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; margin-top: 5px; }

/* Deposit & Cashier Panels */
#reader { width: 100%; border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.cashier-container #reader { border-radius: 10px; }
#userCard { display: none; background: #f8f9fa; border-left: 5px solid var(--success); padding: 15px; border-radius: 5px; margin: 20px 0; text-align: left; }
.user-name { font-weight: bold; font-size: 1.1rem; color: var(--admin-blue); }
.current-balance { color: #666; font-size: 0.9rem; margin-top: 5px; }
#depositArea { display: none; margin-top: 20px; text-align: left; }
#status { margin-top: 20px; font-weight: bold; padding: 10px; border-radius: 5px; display: none; }
.status-success { background: #d4edda; color: #155724; display: block !important; }
.status-error { background: #f8d7da; color: #721c24; display: block !important; }

/* Admin Dashboard Styles */
.dashboard-container { max-width: 600px; margin: 0 auto; padding: 15px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.stat-card { background: #ffffff; border-radius: 12px; padding: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #eef0f2; border-left: 4px solid var(--admin-blue); text-align: left; }
.stat-card.stat-primary { border-left-color: var(--primary); }
.stat-card.stat-success { border-left-color: var(--success); }
.stat-card.stat-warning { border-left-color: #f39c12; }
.stat-card.stat-danger { border-left-color: var(--danger); }
.stat-label { font-size: 0.75rem; color: #7f8c8d; text-transform: uppercase; font-weight: 600; margin-bottom: 5px; }
.stat-value { font-size: 1.3rem; font-weight: bold; color: var(--admin-dark); }

.action-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
.big-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 80px; border-radius: 12px; color: #ffffff; text-decoration: none; font-size: 1.2rem; font-weight: bold; box-shadow: 0 4px 8px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.big-button:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.12); color: #ffffff;}
.big-button:active { transform: translateY(1px); }
.big-button.deposit-btn { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.big-button.payment-btn { background: linear-gradient(135deg, #3498db, #2980b9); }
.big-button i { font-size: 1.6rem; }

/* Admin Transaction List */
.admin-trx-list { background: #ffffff; border-radius: 12px; padding: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #eef0f2; }
.admin-trx-title { font-size: 1rem; font-weight: bold; color: var(--admin-dark); margin-bottom: 10px; border-bottom: 1px solid #eef0f2; padding-bottom: 8px; text-align: left; }
.admin-trx-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef0f2; }
.admin-trx-item:last-child { border-bottom: none; }
.admin-trx-info { text-align: left; }
.admin-trx-user { font-weight: 600; font-size: 0.95rem; color: var(--text); display: block; }
.admin-trx-date { font-size: 0.75rem; color: #7f8c8d; }
.admin-trx-amount { font-weight: bold; font-size: 1rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* History Table Styles */
.filter-panel { background: #ffffff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #eef0f2; margin-bottom: 20px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; }
.filter-group { flex: 1; min-width: 150px; display: flex; flex-direction: column; }
.filter-group label { font-size: 0.8rem; color: #7f8c8d; font-weight: 600; margin-bottom: 5px; }
.filter-group input, .filter-group select { padding: 10px; border: 1px solid #ddd; border-radius: 8px; outline: none; transition: border-color 0.2s; font-family: inherit; }
.filter-group input:focus, .filter-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(52,152,219,0.1); }
.btn-filter, .btn-export { padding: 11px 20px; border-radius: 8px; font-weight: bold; border: none; cursor: pointer; color: white; display: inline-flex; justify-content: center; align-items: center; gap: 8px; transition: opacity 0.2s; text-decoration: none; font-size: 1rem; }
.btn-filter { background: var(--primary); }
.btn-export { background: #27ae60; }
.btn-filter:hover, .btn-export:hover { opacity: 0.9; }

.table-responsive { width: 100%; overflow-x: auto; background: #ffffff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #eef0f2; }
.history-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.history-table th { background: #f8f9fa; color: var(--admin-dark); font-weight: 600; text-align: left; padding: 15px; border-bottom: 2px solid #eef0f2; }
.history-table td { padding: 15px; border-bottom: 1px solid #eef0f2; color: var(--text); font-size: 0.95rem; }
.history-table tr:hover { background: #fafbfc; }

.badge-deposit { background: #d4edda; color: #155724; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-payment { background: #f8d7da; color: #721c24; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-refund { background: #fff3cd; color: #856404; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 20px; flex-wrap: wrap; }
.page-btn { padding: 8px 12px; background: white; border: 1px solid #eef0f2; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.page-btn:hover { background: #f4f7f6; }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Müşteri Listesi & FAB */
.desktop-only { display: block; }
.mobile-only { display: none; }

.action-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; background: #f8f9fa; color: var(--admin-blue); border-radius: 8px; text-decoration: none; margin: 0 2px; transition: all 0.2s; border: 1px solid #eef0f2; }
.action-icon-btn:hover { background: #eef0f2; color: var(--primary); }
.action-icon-btn.action-add { color: var(--success); }
.action-icon-btn.action-add:hover { background: #d4edda; border-color: #c3e6cb; }

.fab-button { position: fixed; bottom: 85px; right: 20px; width: 56px; height: 56px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 15px rgba(52,152,219,0.4); text-decoration: none; transition: transform 0.2s; z-index: 999; }
.fab-button:hover { transform: scale(1.05); color: white;}
.fab-button:active { transform: scale(0.95); }

/* Mobil Kart Görünümü */
.mobile-user-cards { display: flex; flex-direction: column; gap: 12px; }
.user-card-item { background: white; border-radius: 12px; padding: 15px; border: 1px solid #eef0f2; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.user-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f4f7f6; padding-bottom: 10px; margin-bottom: 10px; }
.user-card-name { font-weight: bold; font-size: 1rem; color: var(--text); }
.user-card-balance { font-weight: bold; font-size: 1.2rem; }
.user-card-body { display: flex; justify-content: space-between; align-items: flex-end; }
.user-card-info { display: flex; flex-direction: column; gap: 5px; color: #7f8c8d; font-size: 0.85rem; }
.user-card-actions { display: flex; gap: 8px; }

/* Bottom Navigation Bar (PWA) */
body.has-bottom-nav { padding-bottom: 80px; }
.bottom-navbar { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #ffffff; border-top: 1px solid #eef0f2; display: flex; justify-content: space-around; align-items: center; height: 65px; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,0.03); z-index: 1000; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #7f8c8d; text-decoration: none; flex: 1; height: 100%; transition: color 0.2s; padding-top: 5px; }
.nav-item i { font-size: 1.3rem; margin-bottom: 4px; }
.nav-item span { font-size: 0.7rem; font-weight: 600; }
.nav-item.active { color: var(--primary); }
.nav-item:hover { color: var(--primary); }

@media screen and (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    body { padding: 10px; }
    .container, .admin-container, .cashier-container { width: 100%; border-radius: 10px; box-sizing: border-box; }
    .auth-card, .login-card, .register-card, .admin-login-card { padding: 1.5rem; max-width: 100%; border-radius: 1rem; }
    h2 { font-size: 1.4rem; }
    .balance-amount { font-size: 2rem; }
    .cashier-container input[type="number"] { width: 100%; }
}
