@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,200,0,0');

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Nunito', sans-serif; }
body { background-color: #fcf9f9; color: #4a4040; line-height: 1.6; }

/* Typografie */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: #b36666; font-weight: 600; }
header { background-color: #ffffff; color: #b36666; padding: 2rem 0; text-align: center; border-bottom: 1px solid #f2ecec; box-shadow: 0 2px 10px rgba(0,0,0,0.02);}
header h1 { font-size: 2.2rem; display: flex; align-items: center; justify-content: center; gap: 10px; }

main { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 8px 24px rgba(179, 102, 102, 0.05); margin-bottom: 25px; border: 1px solid #fdfbfb; }
.card h2 { margin-bottom: 20px; border-bottom: 1px solid #f2ecec; padding-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.hidden { display: none !important; }
.page-view { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Ikony */
.material-symbols-outlined { font-size: 1.2rem; vertical-align: middle; }
.icon-inline { font-size: 1.1rem; position: relative; top: 2px; margin-right: 4px; }
.btn-icon { font-size: 1.1rem; }

/* Nástěnka */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.dash-card { cursor: pointer; transition: all 0.3s ease; text-align: center; border: 1px solid #f2ecec; padding: 25px; border-radius: 12px; background: #ffffff; }
.dash-card h3 { font-family: 'Nunito', sans-serif; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; color: #8a6a6a;}
.dash-card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px rgba(179, 102, 102, 0.1); border-color: #d18a8a; }

/* Menu */
.app-nav { display: flex; justify-content: space-between; align-items: center; background: white; padding: 15px 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid #f2ecec; box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: sticky; top: 10px; z-index: 100; }
.app-nav ul { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.app-nav a { display: flex; align-items: center; gap: 6px; color: #7a6a6a; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; transition: 0.2s; }
.app-nav a:hover, .app-nav a.active { background: #faeeee; color: #b36666; }

/* Formuláře */
.input-form-extended, .input-form, .input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; background: #faf8f8; padding: 20px; border-radius: 8px; border: 1px solid #f2ecec; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
input:not([type="checkbox"]), select, textarea { padding: 12px; border: 1px solid #e0d8d8; border-radius: 6px; flex: 1; min-width: 130px; font-size: 0.95rem; background: #ffffff; transition: border 0.3s; color:#4a4040;}
input:focus, select:focus, textarea:focus { border-color: #d18a8a; outline: none; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; cursor: pointer; flex: none; accent-color: #b36666; }
.filter-checks label, .checkbox-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #665b5b; }

/* Tlačítka */
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; background-color: #d18a8a; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-family: 'Nunito', sans-serif; transition: 0.2s; letter-spacing: 0.5px;}
button:hover { background-color: #ba7676; }
.btn-secondary { background-color: #f2ecec; color: #665b5b; }
.btn-secondary:hover { background-color: #e5dada; color: #4a4040;}
.btn-small { padding: 6px 10px; font-size: 0.85rem; }

.priority-Vysoká { color: #e05e5e; font-weight: bold; }
.priority-Střední { color: #eda03b; }
.priority-Nízká { color: #6b9994; }

/* Statistiky a tagy */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-box { background: #faf8f8; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid #f2ecec; }
.stat-box strong { font-size: 1.3rem; color: #b36666; display: block; font-family: 'Playfair Display', serif;}
.stat-positive { background-color: #e9f5ed !important; border-color: #d1e8da !important; }
.stat-positive strong { color: #4fa671 !important; }
.stat-negative { background-color: #fcf4f4 !important; border-color: #f2dbdb !important; }
.stat-negative strong { color: #db6b6b !important; }

.city-badge { display: inline-block; padding: 6px 14px; margin: 4px; background: #fff; border: 1px solid #e5dada; border-radius: 20px; font-size: 0.85rem; color: #665b5b; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}

.helper-stat-box { display: inline-flex; align-items: center; gap: 8px; background: #ffffff; padding: 8px 16px; border-radius: 20px; border: 1px solid #e5dada; font-size: 0.9rem; cursor: pointer; transition: 0.2s; color:#665b5b;}
.helper-stat-box strong { color: #b36666; font-size: 1rem; }
.helper-stat-box:hover { background: #faf8f8; border-color: #d18a8a;}
.helper-stat-box.active { background: #d18a8a; color: white; border-color: #d18a8a; }
.helper-stat-box.active strong { color: white; }

.filter-box { background: #fcfcfc; padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #f2ecec; }
.filter-inputs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.filter-checks { margin-top: 10px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }

/* Tabulky */
.table-container { overflow-x: auto; margin-bottom: 20px; background: white; border-radius: 8px; border: 1px solid #f2ecec;}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid #f2ecec; font-size: 0.95rem; }
th { background: #faf8f8; color: #8a6a6a; text-transform: uppercase; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;}
tr:last-child td { border-bottom: none; }
.editable-input { width: 100%; border: 1px dashed #ccc; padding: 5px; border-radius: 4px; }

.budget-positive { color: #4fa671; font-weight: bold; }
.budget-negative { color: #e05e5e; font-weight: bold; }

.side-nevesta { background-color: #fffafaf5 !important; }
.side-zenich { background-color: #f4f7fcf5 !important; }
.side-spolecny { background-color: #f4fbf7f5 !important; }
.status-declined { color: #e05e5e; font-weight: bold; text-decoration: line-through; }

/* Ubytování */
.acc-place-card { background: white; border: 1px solid #e0d8d8; border-radius: 8px; padding: 18px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}
.acc-place-card h4 { color: #628cb0; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f2ecec; padding-bottom:8px;}
.room-tag { display: inline-block; background: #f0f4f7; color: #43637a; padding: 4px 10px; border-radius: 4px; margin: 3px; font-size: 0.85rem; border: 1px solid #d4dee6; }
.room-tag.partial { background: #fcf9f0; color: #a88d5e; border-color: #e6dfcb; }
.room-tag.full { background: #fcf4f4; color: #b86e6e; text-decoration: line-through; border-color: #e6caca; }

/* Harmonogram & Zasedací pořádek */
.timeline-time { font-size: 1.1rem; font-weight: 700; color: #b36666; }
.seating-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 25px; }
.seating-box { background: #ffffff; border: 1px solid #f2ecec; border-radius: 8px; padding: 20px; box-shadow: 0 4px 12px rgba(179, 102, 102, 0.03);}
.seating-box h4 { color: #b36666; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f9f2f2; padding-bottom: 8px;}

/* VIZUÁLNÍ MÍSTA A JMENOVKY */
.visual-seating-container { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #f2ecec;}
.seat-wrapper { display: flex; flex-direction: column; align-items: center; width: 55px; gap: 6px; }
.seat-label { font-size: 0.7rem; color: #7a6a6a; text-align: center; line-height: 1.1; width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }

.visual-seat { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #d0c4c4; background: #ffffff; cursor: help; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.visual-seat.ceremony-seat { border-radius: 6px; }
.visual-seat.occupied { background: #fdfafb; border-color: #d18a8a; }
.visual-seat.overcap { background: #e05e5e; border-color: #ba4747; animation: pulse 1.5s infinite; }
.visual-seat:hover { transform: translateY(-3px) scale(1.1); z-index: 10; box-shadow: 0 4px 10px rgba(179, 102, 102, 0.15);}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

.delete-row-btn { background: none; border: none; cursor: pointer; color: #d0c4c4; padding: 4px; transition: 0.2s;}
.delete-row-btn:hover { color: #e05e5e; background: transparent; transform: scale(1.1);}

/* Modály */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(74, 64, 64, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(3px);}
.modal-content { background: white; padding: 30px; border-radius: 12px; width: 90%; max-width: 500px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border: 1px solid #f2ecec;}

/* TISKOVÉ STYLY PRO PDF (Na šířku) */
@media print {
    @page { size: landscape; margin: 10mm; } /* Přidán režim na šířku (landscape) pro dlouhé řady */
    body { background: white; color: black; font-family: 'Nunito', sans-serif;}
    header, .app-nav, #authSection, .no-print, .input-form-extended, .table-container, .delete-row-btn, .checkbox-row { display: none !important; }
    #appSection, #seating, .card { display: block !important; box-shadow: none !important; border: none !important; margin: 0 !important; padding: 0 !important; }
    
    .seating-box { page-break-inside: avoid; border: 1px solid #ddd !important; margin-bottom: 20px !important; }
    .visual-seat { border: 1px solid #555 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .visual-seat.occupied { background: #eaeaea !important; }
    
    /* Vylepšení zobrazení plánků na papíře - jemnější rozestupy */
    .visual-seating-container { gap: 6px; } 
    .seat-wrapper { width: auto; min-width: 45px; }

    h2, h3, h4 { color: black !important; }
    .seating-grid { display: block; }
}

@media (max-width: 600px) { .app-nav { flex-direction: column; position: static; } .input-form-extended .row { flex-direction: column; } }
