/* ============================================================
   GLOBÁLNÍ TYPOGRAFIE
   ============================================================ */
body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: #222;
    line-height: 1.5;
}

/* Nadpisy */
h2, h3 {
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
}

.changed-row {
    background-color: #ffe5e5;
}

.changed-cell {
    background-color: #ffe0e0;
    font-weight: bold;
}

/* ============================================================
   FORMULÁŘE A INPUTY
   ============================================================ */
input[type="number"],
input[type="text"],
input[type="date"],
select {
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

/* Filtr */
#vyuctovaniFiltr {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#vyuctovaniFiltr label {
    font-weight: bold;
}

/* ============================================================
   TLAČÍTKA
   ============================================================ */
.btn-round,
button.btn-round,
/* Přepišeme WP/GeneratePress button styly */
button.btn-round,
a.btn-round {
    background: #0078d4 !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    border: none !important;
    font-weight: bold !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    font-size: 14px !important;
}

button.btn-round:hover,
a.btn-round:hover {
    background: #005fa3 !important;
}

/* Tlačítka v tabulkách vedle sebe */
.table-common td button.btn-round {
    display: inline-block !important;
    margin-right: 6px;
    white-space: nowrap;
}

/* Malá tlačítka v tabulkách */
.table-common button,
.table-faktury button,
.table-elektromery button {
    font-size: 12px;
    padding: 3px 6px;
    margin: 2px;
    cursor: pointer;
    border: 1px solid #666;
    background: #eee;
    border-radius: 3px;
}

.table-common button:hover,
.table-faktury button:hover,
.table-elektromery button:hover {
    background: #ddd;
}

/* ============================================================
   TABULKY – UNIVERZÁLNÍ
   ============================================================ */
#konkurenceAllTable {
    width: 100% !important;
    table-layout: auto !important;
}

.table-common {
    width: 100%;
    max-width: 100%;
/*    table-layout: fixed;*/
    table-layout: auto;        
    overflow-wrap: break-word;
}

.table-common td {
    white-space: nowrap;
    text-align: center;
}

.table-common th {
    background: #f0f0f0;
    color: #000;
    font-weight: bold;
    padding: 4px 6px !important;   /* menší mezery */
    border-bottom: 2px solid #ccc;
    white-space: nowrap;
}

.table-common thead th {
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
}
    
.table-common tr:nth-child(even) {
    background: #fafafa;
}

.table-common input[type="text"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 3px 5px;
}

.suggestions-box {
    position: absolute;
    top: 40px;
    left: 110px;
    background: white;
    border: 1px solid #ccc;
    width: 200px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}


.suggestions-box div {
    padding: 6px 10px;
    cursor: pointer;
}

.suggestions-box div:hover {
    background: #f0f0f0;
}




.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table-faktury {
    width: 100%;
    table-layout: fixed;
}

.table-faktury td {
    text-align: center;
}

.table-faktury th {
    padding-top: 6px;
    padding-bottom: 6px;
    vertical-align: middle;
}

.table-faktury th {
    white-space: normal;
    word-break: break-word;
}

/* Čísla doprostřed 
.table-faktury td:nth-child(3),
.table-faktury td:nth-child(4),
.table-faktury td:nth-child(5),
.table-faktury td:nth-child(6),
.table-faktury td:nth-child(7),
.table-faktury td:nth-child(9) {
    text-align: center;
}*/

/* Peníze doprava */
.table-faktury td:nth-child(8) {
    text-align: right;
}

/* Ikony uprostřed */
.table-faktury td:last-child {
    text-align: center;
}


/* Poslední sloupec – zvětšený prostor */
.table-faktury td:last-child,
.table-faktury th:last-child {
    width: 140px;
}

/* Flex jen uvnitř buňky, ne na buňce */
.akce-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Ikonová tlačítka jen pro tabulku faktur */
.table-faktury .btn-round {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* základ kolečka */
.table-faktury .stav {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* zelené = ANO */
.table-faktury .stav-ano {
    background-color: #2ecc71;
}

/* červené = NE */
.table-faktury .stav-ne {
    background-color: #e74c3c;
}

/* zarovnání sloupce doprostřed */
.table-faktury td.vyuctovano {
    text-align: center;
}


.table-elektromery {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}


.table-elektromery td {
    border: 1px solid #ccc;
    padding: 8px 10px;
}

.table-elektromery th {
    background: #f0f0f0;
    font-weight: 600;
    text-align: center;
}

.table-elektromery tr:nth-child(even) {
    background: #fafafa;
}

/* Zarovnání */
.t-left   { text-align: left; }
.t-right  { text-align: right; }
.t-center { text-align: center; }

/* Speciální řádky */
.row-total {
    background: #f9f9f9;
    font-weight: bold;
}

.row-final {
    background: #e8ffe8;
    font-weight: bold;
}

/* Nadpis firmy */
.firma-title {
    margin-top: 30px;
    font-size: 20px;
    font-weight: bold;
}

/* ============================================================
   EDITAČNÍ BOXY
   ============================================================ */
#editBox {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 6px;
}

#editBox label {
    font-weight: bold;
}

#editBox input,
#editBox select {
    width: 250px;
    padding: 6px;
    margin-top: 3px;
    margin-bottom: 12px;
}

/* ============================================================
   Formuláře – jednotný layout 
   ============================================================ */
   
.form-common {
    max-width: 500px;
    padding: 10px 0;
}

.form-common .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-common label {
    font-weight: bold;
    margin-bottom: 4px;
}

.form-common input,
.form-common select {
    width: 100%;
}

/* ============================================================
   ZVÝRAZNĚNÍ ZMĚN – MUSÍ BÝT NA KONCI
   ============================================================ */

#changesTable td.changed-cell {
    background-color: #ffe0e0 !important;
    font-weight: bold;
    border-left: 4px solid #ff0000;
}


/* ============================================================
   ZVÝRAZNĚNÍ BLOKŮ ZMĚN
   ============================================================ */

#changesTable tr.block-end td {
    border-bottom: 4px solid #000 !important;
}

#changesTable .t-left {
    text-align: left !important;
}

.obraty-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    padding: 10px 0;
}

.prodeje-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    padding: 10px 0;
}

.chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
}

.chart-scroll canvas {
    min-width: 1600px; /* můžeš dát 2000, 3000 podle počtu kategorií */
}

.chart-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
}
