/* Generátor faktur - vlastní styly */
html, body {
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
}
.app-nav {
    background: #1a1a2e !important;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
/* Nav je sticky-top, takže zabírá místo v toku. Dřív byl fixed-top a obsah se
   odsazoval natvrdo o 56px - jenže .app-nav si přidává 0.75rem paddingu nahoru
   i dolů a při užším desktopu se položky zalomí na dva řádky, takže nav naroste
   až na 100px a 44px obsahu zmizelo pod ním (tlačítko PDF nešlo kliknout). */
.app-content {
    padding-top: 0;
}
/* Sticky lišta překrývá cíl skoku na kotvu nebo scrollIntoView. scroll-padding
   posune cíl pod ni. Hodnota je horní odhad výšky navigace: naměřeno 69px
   u odhlášeného širokého okna, 100px těsně nad breakpointem lg, kde se položky
   zalomí na dva řádky, a 105px na mobilu, kde se zalomí taky. */
html {
    scroll-padding-top: 112px;
}
/* Nav buttons - stejné jako landing */
.btn-nav-login {
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 22px;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #fff;
    background: rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}
.btn-nav-login:hover {
    border-color: #D3AF37;
    color: #D3AF37;
    background: rgba(211,175,55,0.08);
}
.btn-nav-cta {
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 24px;
    border-radius: 50px;
    border: none;
    color: #1a1a2e;
    background: linear-gradient(135deg, #D3AF37 0%, #e8c84a 100%);
    transition: all 0.3s ease;
}
.btn-nav-cta:hover {
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(211,175,55,0.4);
}

.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: none;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    font-size: 1.05rem;
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    border-radius: 12px 12px 0 0;
    padding-left: 20px;
    padding-right: 20px;
}

.item-row textarea {
    resize: vertical;
    min-height: 38px;
}

.form-label {
    font-weight: 500;
    color: #333;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.item-total {
    background-color: #f8f9fa !important;
    font-weight: 600;
    text-align: right;
}

.item-price, .item-qty {
    text-align: right;
}

#previewFrame {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.input-group .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Spinner pro načítání ARES */
.ares-loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #dee2e6;
    border-right-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard stat karty */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card.border-primary { border-left-color: var(--bs-primary) !important; }
.stat-card.border-success { border-left-color: var(--bs-success) !important; }
.stat-card.border-warning { border-left-color: var(--bs-warning) !important; }
.stat-card.border-danger { border-left-color: var(--bs-danger) !important; }

/* Tabulky */
.table-hover tbody tr {
    cursor: default;
    transition: background-color 0.1s;
}

/* Quick action buttons */
.quick-action {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background-color 0.15s;
}
.quick-action:hover {
    background-color: #f0f0f0;
}

/* Profil - logo náhled */
.logo-preview {
    max-height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
}

/* Navbar gold button */
.navbar .btn-gold {
    background: linear-gradient(135deg, #D3AF37, #c4a030);
    border: none;
    color: white;
}
.navbar .btn-gold:hover {
    background: linear-gradient(135deg, #c4a030, #b59528);
    color: white;
}

/* Empty state */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}
.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
}

/* Položky faktury a proformy na mobilu: řádek jako karta, pole pod sebou
   s popiskem z data-label. V tabulce měla pole na 390 px jen 32 až 36 px (#44). */
@media (max-width: 767.98px) {
    .tabulka-polozek thead { display: none; }
    .tabulka-polozek, .tabulka-polozek tbody, .tabulka-polozek tfoot { display: block; width: 100%; }
    .tabulka-polozek tr.item-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .5rem .75rem;
        padding: .75rem;
        border-bottom: 1px solid var(--bs-border-color);
    }
    .tabulka-polozek tr.item-row > td { display: block; border: 0; padding: 0 !important; width: auto !important; }
    .tabulka-polozek tr.item-row > td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .75rem;
        color: var(--bs-secondary-color);
        margin-bottom: .15rem;
    }
    .tabulka-polozek td.polozka-popis { grid-column: 1 / -1; order: -1; }
    .tabulka-polozek td.polozka-akce { grid-column: 1 / -1; justify-self: end; }
    .tabulka-polozek tfoot tr { display: flex; justify-content: space-between; padding: .5rem .75rem; }
    .tabulka-polozek tfoot td { display: block; border: 0; }
    .tabulka-polozek tfoot td:empty { display: none; }
}

/* Responzivita */
@media (max-width: 768px) {
    .sticky-bottom {
        flex-direction: column;
        gap: 10px;
    }
    .sticky-bottom .btn {
        width: 100%;
    }
    .stat-card {
        margin-bottom: 0.5rem;
    }
}
