/* ============================================
   STYLE.CSS - Gutschein System
   Alle Styles für coupon.html, service.html, nfc.html
   ============================================ */

/* ========== GRUNDLEGENDE RESETS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

/* ========== DARK MODUS ========== */
body.dark-mode {
    background: #1a1a2e;
    color: #eee;
}

body.dark-mode .card {
    background: #16213e;
    border-color: #0f3460;
    color: #eee;
}

body.dark-mode .login-box {
    background: #16213e;
}

body.dark-mode .header {
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #0f3460;
    color: #eee;
    border-color: #1a4a8a;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #667eea;
    outline: none;
}

body.dark-mode .customer-card {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .customer-card:hover {
    border-color: #667eea;
}

body.dark-mode .btn-secondary {
    background: #2a2a4a;
    color: #eee;
}

body.dark-mode .btn-secondary:hover {
    background: #3a3a5a;
}

body.dark-mode .nfc-login {
    background: #16213e;
}

body.dark-mode .nfc-login h1 {
    color: #8b9fff;
}

body.dark-mode .nfc-login p {
    color: #aaa;
}

body.dark-mode .transaction-dialog-content {
    background: #16213e;
}

body.dark-mode .form-group label {
    color: #ddd;
}

body.dark-mode .language-selector select {
    background: #0f3460;
    color: #eee;
    border-color: #1a4a8a;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.login-box h1 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 28px;
}

.login-box p {
    margin-bottom: 25px;
    color: #666;
}

.login-box input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-box input:focus {
    border-color: #667eea;
    outline: none;
}

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

.login-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#loginError {
    color: #ff4757;
    margin-top: 10px;
    font-weight: 600;
}

/* ========== HEADER ========== */
.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 22px;
    color: #667eea;
    margin: 0;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== SPRACH-SELECTOR ========== */
.language-selector select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.language-selector select:hover {
    border-color: #667eea;
}

.language-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.card h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark-mode .card h2 {
    color: #8b9fff;
}

/* ========== FORMULARE ========== */
.form-group {
    margin-bottom: 18px;
}

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

body.dark-mode .form-group label {
    color: #ccc;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #0f3460;
    color: #eee;
    border-color: #1a4a8a;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

/* ========== FORM ROWS ========== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== LINK GROUP ========== */
.link-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-group input {
    flex: 1;
    min-width: 0;
}

.link-group button {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
    background: #e8e8e8;
    color: #333;
}

body.dark-mode .link-group button {
    background: #2a2a4a;
    color: #eee;
}

.link-group button:hover {
    transform: scale(1.05);
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #e8e8e8;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: #d5d5d5;
    transform: scale(1.02);
}

body.dark-mode .btn-secondary {
    background: #2a2a4a;
    color: #eee;
}

body.dark-mode .btn-secondary:hover {
    background: #3a3a5a;
}

.btn-danger {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #ff3344;
    transform: scale(1.03);
    box-shadow: 0 5px 20px rgba(255, 71, 87, 0.4);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: #1da85c;
    transform: scale(1.03);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.btn-success {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-success:hover {
    background: #27ae60;
    transform: scale(1.03);
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.action-buttons button {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

/* ========== CUSTOMER GRID ========== */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 15px;
}

.customer-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.customer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

body.dark-mode .customer-card {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .customer-card:hover {
    border-color: #667eea;
}

.customer-card h3 {
    margin: 0 0 8px 0;
    color: #667eea;
    font-size: 17px;
}

body.dark-mode .customer-card h3 {
    color: #8b9fff;
}

.customer-card p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

body.dark-mode .customer-card p {
    color: #ccc;
}

.customer-card .actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.customer-card .actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.customer-card .actions button:hover {
    transform: scale(1.05);
}

/* ========== NFC CARD (Kundenansicht) ========== */
.nfc-card {
    max-width: 420px;
    margin: 30px auto;
    padding: 35px 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    transition: background 0.5s ease;
    animation: fadeInUp 0.6s ease-out;
}

.nfc-card .profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 18px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
    position: relative;
}

.nfc-card .profile-photo:hover {
    border-color: white;
    transform: scale(1.02);
}

.nfc-card .profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nfc-card .profile-photo label {
    cursor: pointer;
    font-size: 36px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nfc-card .profile-photo label:hover {
    opacity: 1;
}

.nfc-card .customer-name {
    font-size: 26px;
    font-weight: 700;
    margin: 5px 0 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nfc-card .voucher-info {
    font-size: 15px;
    opacity: 0.9;
    margin: 6px 0;
}

.nfc-card .balance {
    font-size: 52px;
    font-weight: 800;
    margin: 18px 0 10px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.nfc-card .balance .balance-currency {
    font-size: 28px;
    font-weight: 600;
}

.nfc-card .shop-info {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.nfc-card .shop-info p {
    margin: 6px 0;
    font-size: 15px;
    opacity: 0.95;
}

.nfc-card .shop-info .shop-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.nfc-card .shop-info .shop-actions a {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 14px;
}

.nfc-card .shop-info .shop-actions a:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

/* Passwort ändern Bereich in NFC */
.nfc-card .password-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nfc-card .password-section button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.nfc-card .password-section button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.nfc-card .password-change-area {
    display: none;
    margin-top: 12px;
}

.nfc-card .password-change-area input {
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    text-align: center;
    width: 120px;
    font-size: 18px;
    letter-spacing: 4px;
    background: rgba(255, 255, 255, 0.9);
}

body.dark-mode .nfc-card .password-change-area input {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.nfc-card .password-change-area button {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 8px;
}

.nfc-card .password-change-area button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Farbauswahl in NFC */
.nfc-card .color-selector {
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nfc-card .color-selector label {
    font-size: 14px;
    opacity: 0.9;
}

.nfc-card .color-selector input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.nfc-card .color-selector input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.nfc-card .color-selector input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

/* ========== NFC LOGIN ========== */
.nfc-login {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px 35px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.nfc-login h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.nfc-login p {
    color: #666;
    margin-bottom: 25px;
}

.nfc-login input {
    width: 100%;
    padding: 15px;
    margin: 10px 0 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 22px;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 600;
    transition: border-color 0.3s;
}

.nfc-login input:focus {
    border-color: #667eea;
    outline: none;
}

.nfc-login button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.nfc-login button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(102, 126, 234, 0.4);
}

.nfc-login .login-error {
    color: #ff4757;
    margin-top: 12px;
    display: none;
    font-weight: 600;
}

.nfc-login .hint {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

/* ========== TRANSACTION DIALOG ========== */
#transactionDialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.transaction-dialog-content {
    background: white;
    padding: 35px 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

body.dark-mode .transaction-dialog-content {
    background: #16213e;
}

.transaction-dialog-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

body.dark-mode .transaction-dialog-content h2 {
    color: #8b9fff;
}

.transaction-dialog-content .customer-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

body.dark-mode .transaction-dialog-content .customer-info {
    background: #0f3460;
}

.transaction-dialog-content .customer-info p {
    margin: 4px 0;
}

.transaction-dialog-content .form-group {
    margin-bottom: 16px;
}

.transaction-dialog-content .dialog-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.transaction-dialog-content .dialog-actions button {
    flex: 1;
    justify-content: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header h1 {
        font-size: 18px;
        text-align: center;
    }
    
    .header-controls {
        justify-content: center;
        width: 100%;
    }
    
    .language-selector select {
        width: 100%;
    }
    
    .card {
        margin: 10px;
        padding: 16px;
    }
    
    .card h2 {
        font-size: 17px;
    }
    
    .customer-grid {
        grid-template-columns: 1fr;
    }
    
    .link-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .link-group input {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
        min-width: unset;
    }
    
    .nfc-card {
        margin: 15px;
        padding: 25px 20px;
    }
    
    .nfc-card .balance {
        font-size: 38px;
    }
    
    .nfc-card .customer-name {
        font-size: 20px;
    }
    
    .nfc-login {
        margin: 30px 15px;
        padding: 30px 20px;
    }
    
    .nfc-login input {
        font-size: 18px;
        letter-spacing: 6px;
    }
    
    .transaction-dialog-content {
        padding: 25px 18px;
    }
    
    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* ========== ANIMATIONEN ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

.customer-card {
    animation: fadeInUp 0.4s ease-out;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

body.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd6;
}

/* ========== UTILITY ========== */
.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.w-100 {
    width: 100%;
}

/* ========== BENACHRICHTIGUNGEN (Toast) ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: fadeInUp 0.3s ease-out;
    max-width: 350px;
}

.toast-success {
    background: #2ecc71;
}

.toast-error {
    background: #ff4757;
}

.toast-info {
    background: #667eea;
}

/* ========== PRINT STYLES ========== */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .no-print {
        display: none !important;
    }
}