@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
    --font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --theme-color: #0f9759;
    --theme-color-rgb: 15, 151, 89;
    --theme-color-hover: #0c804b;
    --theme-color-light: #f0fdf4;
    
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-black: #0f172a;
    
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-danger-light: #fef2f2;
}

body, html {
    margin: 0px;
    padding: 0px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 12px 8px;
}

p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    margin: 8px 0 16px 16px;
}

img {
    border: none;
}

#back {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

.both {
    clear: both;
}

.cenaCelkem {
    text-align: right;
    font-weight: 700;
    font-size: 16px;
    margin-right: 32px;
    margin-top: 16px;
    color: var(--color-black);
}

.cenaCelkem .cena {
    display: inline-block;
    min-width: 100px;
    font-weight: 400;
    color: var(--theme-color);
}

/* Status styles for tables */
table .zruseno td {
    background-color: var(--color-danger-light);
    color: #991b1b;
}

table .pujceno td {
    background-color: var(--theme-color-light);
    color: #166534;
}

.legenda {
    margin-left: 32px;
    margin-top: 16px;
    border-collapse: collapse;
}

.legenda td {
    padding: 6px 12px;
    border: none;
    font-size: 13px;
    font-weight: 500;
}

/* Tisk (Print Layout) */
#tisk {
    background: white;
    height: 100%;
    padding: 32px;
    box-sizing: border-box;
    max-width: 1000px;
    margin: 0 auto;
    color: black;
    font-family: var(--font-family);
}

#tisk .jilemnickoLogo {
    float: right;
}

#tisk p {
    padding: 10px 22px;
    margin: 0px;
    color: black;
}

#tisk h1 {
    margin-top: 0px;
    text-align: center;
    font-size: 24px;
    color: black;
}

#tisk table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

#tisk table td {
    border: 1px solid black;
    padding: 8px;
    color: black;
}

#tisk table thead td {
    background-image: url('img/999999.png');
    background-repeat: repeat;    
    background: #999999;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    color: black;
}

#tisk table .hlavickaVybaveni td {
    background-image: url('img/5555AA.png');
    background-repeat: repeat;
    background-color: #5555AA;
    color: white !important;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
}

#tisk table .cislo {
    width: 20px;
    text-align: center;
}

#tisk .celkem, #tisk .celkemCena {
    font-size: 15px;
    font-weight: bold;
}

#tisk .predal td {
    font-size: 18px;
    font-weight: bold;    
    width: 33.3%;
}

#tisk .zavady {
    font-weight: bold;
    font-size: 15px;
}

#tisk .zavady td {
    font-size: 13px;
}

#tisk .zavady td.nic {
    border: 0px;
}

@media print {
    #tisk {
        margin: 0px;
        padding: 0px;
    }
    #tisk .button {
        display: none;
    }
    #tisk table thead td {
        background-image: url('img/999999.png');
        background-repeat: repeat;    
        background-color: #999999;
        box-shadow: inset 0 0 0 1000px #999999;
        color: black !important;
    }     
    #tisk table .hlavickaVybaveni td {
        background-image: url('img/5555AA.png');
        background-repeat: repeat;
        background-color: #5555AA;
        box-shadow: inset 0 0 0 1000px #5555AA;
        color: white !important;
    }
}


/* Login */
#login {
    margin: 150px auto;
    background-color: var(--color-card);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
    box-sizing: border-box;
    text-align: center;
}

#login h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

#login a {
    color: var(--theme-color);
    text-decoration: none;
    font-weight: 600;
}

#login a:hover {
    text-decoration: underline;
}

/* Admin Layout */
#admin {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-bg);
}

#admin .menu {
    width: 250px;
    background-color: var(--color-card);
    border-right: 1px solid var(--color-border);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    flex-shrink: 0;
    box-sizing: border-box;
}

#admin .menu .logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
    object-fit: contain;
}

#admin .menu .rango {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--theme-color);
    background-color: var(--theme-color-light);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 24px;
    text-align: center;
}

#admin .menu hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 12px 0;
    width: 100%;
}

/* Sidebar buttons */
#admin .menu a, 
#admin .menu .button {
    display: block;
    padding: 10px 16px;
    margin: 2px 0;
    background-color: transparent;
    color: var(--color-text-muted);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: none;
}

#admin .menu a:hover, 
#admin .menu .button:hover {
    background-color: var(--theme-color-light);
    color: var(--theme-color);
}

#admin .menu a.ko, 
#admin .menu .button.ko {
    color: var(--color-danger);
}

#admin .menu a.ko:hover, 
#admin .menu .button.ko:hover {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

#admin #content {
    flex-grow: 1;
    padding: 40px;
    background-color: var(--color-bg);
    box-sizing: border-box;
    overflow-y: auto;
}

.hlaska {
    font-size: 15px;
    font-weight: 600;
    color: var(--theme-color);
    padding: 12px 16px;
    background-color: var(--theme-color-light);
    border: 1px solid rgba(15, 151, 89, 0.2);
    border-radius: 6px;
    margin-bottom: 24px;
}

/* ModulCalendar */
.ModulCalendar {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ModulCalendar thead td {
    background-color: var(--theme-color);
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 14.27%;
    border: none;
}

.ModulCalendar tbody td {
    border: 1px solid var(--color-border);
    height: 100px;
    vertical-align: top;
    padding: 8px;
    background-color: var(--color-card);
}

.ModulCalendar .day {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    display: inline-block;
}

.ModulCalendar a {
    color: var(--color-text);
    text-decoration: none;
}

.ModulCalendar a:hover {
    text-decoration: none;
}

.ModulCalendar .item {
    display: block;
    margin-bottom: 4px;
    background-color: var(--theme-color-light);
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ModulCalendar .item:hover {
    background-color: #dcfce7;
    transform: translateY(-1px);
}

/* tables */
.tabulka {
    margin: 24px 0;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tabulka table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tabulka thead td {
    background-color: var(--theme-color);
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 12px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
}

.tabulka thead td:first-child {
    border-radius: 0px;
}

.tabulka thead td:last-child {
    border-radius: 0px;
}

.tabulka tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.15s ease;
}

.tabulka tbody tr:last-child {
    border-bottom: none;
}

.tabulka tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.tabulka tbody tr:hover {
    background-color: #f1f5f9;
}

.tabulka tbody td {
    padding: 12px 16px;
    border: none;
    border-right: 1px solid var(--color-border);
    color: var(--color-text);
}

.tabulka tbody td:last-child {
    border-right: none;
}

.tabulka .smer {
    padding-left: 8px;
    text-decoration: none;
    color: var(--theme-color);
    font-weight: 600;
}

.tabulka td table {
    background: none;
    width: auto;
}

.tabulka td table tr {
    background: none;
    border: none;
}

.tabulka td table tr:nth-child(odd) {
    background: none;
}

.tabulka td table tr:hover {
    background: none;
}

.tabulka td table td {
    background: none;
    border: none;
}


/* Formular */
.Formular {
    max-width: 600px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.Formular .label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--color-text);
}

.Formular .label:first-of-type {
    margin-top: 0;
}

.Formular input, 
.Formular textarea, 
.Formular select {
    margin-left: 0px;
    width: 100%;
    max-width: 100%;
}

.Formular textarea {
    height: 120px;
}

.Formular input[type=submit] {
    display: inline-block;
    width: auto;
    margin-top: 16px;
    margin-left: 0px;
}

.Formular .symbolFor {
    display: inline-block;
    padding-left: 8px;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Form inputs & buttons elements */
input, textarea, select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(15, 151, 89, 0.15);
    outline: none;
}

input[readonly], textarea[readonly], select[disabled] {
    background-color: #f1f5f9;
    color: var(--color-text-muted);
    cursor: not-allowed;
}

select {
    display: inline-block;
    width: auto;
    margin-right: 20px;
}

input[type=checkbox] {
    display: inline-block;
    width: auto;
    scale: 1.2;
    margin: 8px 12px;
}

.button, input[type=submit] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--theme-color);
    color: #ffffff;
    border: 1px solid var(--theme-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.button:hover, input[type=submit]:hover {
    background-color: var(--theme-color-hover);
    border-color: var(--theme-color-hover);
    color: #ffffff;
}

.button.ko, input[type=submit].ko {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.button.ko:hover, input[type=submit].ko:hover {
    background-color: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}