/* Reset & Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #A8B796;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #F6EAD2;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

header h1 {
    color: #8B5A3C;
    font-size: 28px;
}

/* Main Content */
main {
    background-color: #F6EAD2;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
}

/* Buttons - Einheitliches Design */
button {
    background-color: #A67C52;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 48px;
}

button:hover {
    background-color: #8B5A3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Sekundär-Buttons (Zurück, Abbrechen) */
button.secondary,
.list-header button,
.scanner-buttons button:last-child {
    background-color: #6B7C59;
}

button.secondary:hover,
.list-header button:hover,
.scanner-buttons button:last-child:hover {
    background-color: #5a6b4a;
}

/* Dashboard */
.dashboard h2 {
    color: #8B5A3C;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

/* Statistiken */
.stats {
    margin-top: 20px;
}

.stats h3 {
    color: #6B7C59;
    margin-bottom: 15px;
}

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

.stat-card {
    background-color: #D7C4A3;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6B7C59;
    font-weight: bold;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #8B5A3C;
}

.stat-amount {
    font-size: 14px;
    color: #A67C52;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    main {
        padding: 20px;
    }
}

/* ====================================
   GUTSCHEIN-LISTE
   ==================================== */

.voucher-list h2 {
    color: #8B5A3C;
    margin-bottom: 20px;
}

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

.list-header button {
    background-color: #6B7C59;
}

.list-header button:hover {
    background-color: #5a6b4a;
}

/* Tabelle */
.voucher-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voucher-table th,
.voucher-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #E8D9B6;
}

.voucher-table th {
    background-color: #D7C4A3;
    color: #8B5A3C;
    font-weight: bold;
}

.voucher-table tr:hover {
    background-color: #F6EAD2;
}

/* Status-Badges - Pill-Design */
.status-active,
.status-redeemed,
.status-expired,
.status-cancelled {
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.status-active {
    background-color: #6B7C59;
}

.status-active::before {
    content: "● ";
}

.status-redeemed {
    background-color: #A67C52;
}

.status-redeemed::before {
    content: "● ";
}

.status-expired {
    background-color: #999;
}

.status-expired::before {
    content: "● ";
}

.status-cancelled {
    background-color: #c0392b;
}

.status-cancelled::before {
    content: "● ";
}

/* ====================================
   EINLÖSEN-SEITE
   ==================================== */

.redeem-page h2 {
    color: #8B5A3C;
}

/* Suchbox */
.search-box {
    background-color: #D7C4A3;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.search-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #6B7C59;
}

.search-box input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #E8D9B6;
    border-radius: 8px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.search-box input:focus {
    outline: none;
    border-color: #A67C52;
}

.search-box button {
    width: 100%;
}

/* Nicht gefunden */
.not-found {
    background-color: #f8d7da;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #721c24;
}

/* Gutschein-Details */
.voucher-details {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voucher-details h3 {
    color: #8B5A3C;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #E8D9B6;
}

.detail-label {
    color: #6B7C59;
}

.detail-value {
    color: #333;
}

/* Einlösen-Bereich */
.redeem-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #E8D9B6;
}

.redeem-section h4 {
    color: #6B7C59;
    margin-bottom: 15px;
}

.redeem-input {
    margin-bottom: 15px;
}

.redeem-input label {
    display: block;
    margin-bottom: 5px;
    color: #6B7C59;
}

.redeem-input input {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #E8D9B6;
    border-radius: 8px;
}

.redeem-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.redeem-buttons button.secondary {
    background-color: #6B7C59;
}

.redeem-buttons button.secondary:hover {
    background-color: #5a6b4a;
}

/* Kann nicht einlösen */
.cannot-redeem {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-radius: 8px;
    color: #856404;
    text-align: center;
}

/* ====================================
   KLAPPBARE GUTSCHEIN-KARTEN
   ==================================== */

.voucher-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.voucher-card {
    background-color: #F6EAD2;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.voucher-card:hover {
    border-color: #D7C4A3;
}

.voucher-card.expanded {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-arrow {
    color: #8B5A3C;
    font-size: 12px;
}

.card-code {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.card-details {
    padding: 15px 20px 20px 20px;
    margin-left: 24px;
    border-top: 1px solid #E8D9B6;
    margin-right: 20px;
}

/* Detail-Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    gap: 8px;
}

.detail-item .label {
    font-size: 14px;
    color: #6B7C59;
    font-weight: bold;
    min-width: 100px;
}

.detail-item .value {
    font-size: 14px;
    color: #333;
}

/* Status-Badges in Karten */
.card-header .status-active,
.card-header .status-redeemed,
.card-header .status-expired {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}

/* Transaktions-Historie */
.transaction-history {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E8D9B6;
}

.transaction-history strong {
    color: #6B7C59;
    font-size: 14px;
}

.transaction-history ul {
    list-style: none;
    margin-top: 10px;
}

.transaction-history li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.transaction-history li:last-child {
    border-bottom: none;
}

.trans-date {
    color: #888;
}

.trans-action {
    color: #333;
}

.no-history {
    color: #888;
    font-style: italic;
    font-size: 14px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 500px) {
    .card-header {
        padding: 15px;
    }
    
    .card-code {
        font-size: 16px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 2px;
    }
    
    .detail-item .label {
        min-width: auto;
    }
}

/* ====================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ==================================== */

/* Kleine Handys (bis 400px) */
@media (max-width: 400px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 18px;
    }
    
    main {
        padding: 15px;
    }
    
    button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .card-code {
        font-size: 14px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .list-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .list-header button {
        width: 100%;
    }
}

/* Normale Handys (401px - 600px) */
@media (min-width: 401px) and (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (601px - 900px) */
@media (min-width: 601px) and (max-width: 900px) {
    .container {
        padding: 15px;
    }
    
    .action-buttons button {
        flex: 1 1 45%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop (über 900px) */
@media (min-width: 901px) {
    .container {
        padding: 20px;
        max-width: 1000px;
    }
    
    .voucher-cards {
        max-width: 800px;
    }
}

/* Touch-Optimierung */
@media (hover: none) and (pointer: coarse) {
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .voucher-card {
        min-height: 60px;
    }
    
    input {
        min-height: 44px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

/* ====================================
   GUTSCHEIN ERSTELLEN
   ==================================== */

.create-page h2 {
    color: #8B5A3C;
}

#create-form {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #6B7C59;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.form-group label::after {
    color: #c0392b;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #E8D9B6;
    border-radius: 10px;
    background-color: white;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B5A3C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #A67C52;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05), 0 0 0 3px rgba(166, 124, 82, 0.15);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 13px;
}

.create-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: #6B7C59;
}

.create-btn:hover {
    background-color: #5a6b4a;
}

.create-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Bestätigungs-Seite */
.created-page {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.success-header {
    background: linear-gradient(135deg, #6B7C59 0%, #5a6b4a 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(107, 124, 89, 0.3);
}

.success-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
}

.voucher-summary {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #E8D9B6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-label {
    color: #888;
    font-size: 14px;
    font-weight: 600;
}

.summary-value {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.code-highlight {
    font-size: 24px;
    color: #8B5A3C;
    font-weight: 700;
    letter-spacing: 1px;
}

.qr-container {
    margin-top: 25px;
    padding: 25px;
    display: flex;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 2px dashed #E8D9B6;
}

.qr-container canvas,
.qr-container img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.created-page .action-buttons {
    flex-direction: column;
    gap: 12px;
}

/* ====================================
   KLAPPBARE STATISTIK-SEKTIONEN
   ==================================== */

.stats-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stats-section:hover {
    border-color: #D7C4A3;
}

.stats-section.expanded {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.stats-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #8B5A3C;
}

.stats-arrow {
    color: #8B5A3C;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.stats-section.expanded .stats-arrow {
    transform: rotate(90deg);
}

.stats-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #E8D9B6;
}

.stats-section.expanded > div > .stats-content,
.stats-section.expanded > .stats-content {
    display: block;
}

/* Stats Grid bleibt wie vorher, nur innerhalb der Content-Bereich */
.stats-content .stats-grid {
    margin-top: 15px;
}

/* ====================================
   ZEITRAUM-FILTER
   ==================================== */

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-buttons button {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 14px;
    background-color: #D7C4A3;
    color: #333;
}

.filter-buttons button:hover {
    background-color: #C4B090;
}

.filter-buttons button.active {
    background-color: #A67C52;
    color: white;
    font-weight: bold;
}

@media (max-width: 600px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons button {
        width: 100%;
    }
}

/* ====================================
   ADMIN LOGIN
   ==================================== */

.login-page {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
}

.login-page h2 {
    color: #8B5A3C;
    margin-bottom: 30px;
}

.login-box {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-box input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #E8D9B6;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

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

.login-box button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

.login-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ====================================
   DIAGRAMME
   ==================================== */

.charts-section {
    margin-top: 30px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h4 {
    color: #8B5A3C;
    margin-bottom: 15px;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

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

/* ====================================
   STORNIEREN-BUTTON
   ==================================== */

.cancel-voucher-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #E8D9B6;
}

.cancel-btn {
    background-color: #8B5A3C;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn:hover {
    background-color: #6d3d28;
}

/* ====================================
   QR-CODE SCANNER
   ==================================== */

.scanner-container {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.scanner-container h3 {
    color: #8B5A3C;
    margin-bottom: 15px;
    text-align: center;
}

#qr-reader {
    border: 2px solid #E8D9B6;
    border-radius: 8px;
    overflow: hidden;
}

#qr-reader video {
    width: 100%;
    border-radius: 8px;
}

.scanner-info {
    margin-top: 15px;
    padding: 12px;
    background-color: #F6EAD2;
    border-radius: 8px;
    color: #6B7C59;
    text-align: center;
    font-size: 14px;
}

.scanner-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.scanner-buttons button {
    flex: 1;
}

/* ====================================
   SUCHE/FILTER IN GUTSCHEIN-LISTE
   ==================================== */

.list-search-box {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.list-search-box input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #E8D9B6;
    border-radius: 8px;
    margin-bottom: 10px;
}

.list-search-box input:focus {
    outline: none;
    border-color: #A67C52;
}

.filter-buttons-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-buttons-row button {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 13px;
    background-color: #D7C4A3;
    color: #333;
}

.filter-buttons-row button.active {
    background-color: #6B7C59;
    color: white;
}

.filter-buttons-row button:hover {
    background-color: #C4B090;
}

.filter-buttons-row button.active:hover {
    background-color: #5a6b4a;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6B7C59;
    font-style: italic;
}

/* ====================================
   KASSENABSCHLUSS / TÄGLICHE EINLÖSUNGEN
   ==================================== */

.redemption-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.redemption-date-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.redemption-date-row button {
    flex: 0 0 50px;
    background-color: #D7C4A3;
    border: 2px solid #E8D9B6;
    font-size: 20px;
}

.redemption-date-row button:hover {
    background-color: #C4B090;
}

/* Mobile: Buttons schmaler */
@media (max-width: 600px) {
    .redemption-date-row {
        gap: 5px;
    }
    
    .redemption-date-row button {
        flex: 0 0 40px;
        font-size: 18px;
        padding: 8px 4px;
    }
    
    .redemption-date-row input[type="date"] {
        font-size: 14px;
        padding: 10px 8px;
    }
}

.redemption-date-row button {
    flex: 0 0 50px;
    background-color: #D7C4A3;
    border: 2px solid #E8D9B6;
}

.redemption-date-row button:hover {
    background-color: #C4B090;
}

.redemption-date-row input[type="date"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #E8D9B6;
    border-radius: 8px;
    font-size: 16px;
}

.redemption-button-row {
    display: flex;
    gap: 10px;
}

.redemption-button-row button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.redemption-load-btn {
    background-color: #6B7C59 !important;
    color: white;
}

.redemption-export-btn {
    background-color: #A67C52 !important;
    color: white;
}

.redemption-hint {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 20px;
}

/* Responsive: Kleinere Bildschirme */
@media (max-width: 600px) {
    .redemption-date-row {
        flex-direction: column;
    }
    
    .redemption-button-row button {
        font-size: 15px;
        padding: 14px;
    }
}

/* ====================================
   ANIMATIONEN
   ==================================== */

/* Basis-Animation für Seiten-Übergänge */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Seiten-Inhalt animieren - nur bei echtem Seitenwechsel */
.create-page,
.created-page,
.redeem-page,
.login-page {
    animation: fadeIn 0.3s ease-out;
}

/* Dashboard ohne Animation (verhindert Blitzen bei Filter-Wechsel) */
.dashboard {
    animation: none;
}

/* Buttons verbessern */
button {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Gutschein-Cards - keine Animation (verhindert Blitzen bei Filter) */
.voucher-card {
    opacity: 1;
}

/* Stat-Cards animiert */
.stat-card {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

/* Klappbare Bereiche smooth */
.card-details {
    overflow: hidden;
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.voucher-card.expanded .card-details {
    max-height: 500px;
    padding: 0 20px 20px 20px;
    opacity: 1;
}

/* Stats-Content smooth */
.stats-content {
    overflow: hidden;
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    display: block !important;
}

.stats-section.expanded > .stats-content {
    max-height: none;
    padding: 20px;
    opacity: 1;
}

/* Input-Felder verbessert */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid #E8D9B6;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

input:focus, select:focus, textarea:focus {
    border-color: #A67C52;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), 0 0 0 3px rgba(166, 124, 82, 0.15);
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

/* Success-Header Bounce */
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.success-header {
    animation: successPop 0.4s ease-out;
}

/* QR-Code Einblenden */
.qr-container {
    animation: fadeIn 0.5s ease-out 0.2s;
    animation-fill-mode: both;
}

/* Status-Badges leichtes Pulsieren bei Hover */
.status-active:hover,
.status-redeemed:hover,
.status-expired:hover,
.status-cancelled:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Voucher-Card Hover verbessern */
.voucher-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Filter-Buttons Animation */
.filter-buttons button,
.filter-buttons-row button {
    transition: all 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons-row button:hover {
    transform: translateY(-1px);
}

/* Modal Fade-In */
#chart-popup-modal {
    animation: fadeIn 0.2s ease-out;
}

/* Loading-State für Buttons */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Smooth Scroll für die ganze App */
html {
    scroll-behavior: smooth;
}

/* Reduzierte Bewegung für Nutzer die das bevorzugen */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}