/* Projekty Viagem — jednoduchy vlastni styl, bez frameworku */
* { box-sizing: border-box; }
body {
    margin: 0;
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    color: #1f2733;
}
a { color: #1b6ac9; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }

/* --- horni lista --- */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    background: #182236; color: #fff; padding: .55rem 1.2rem;
}
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand span { color: #8fb7f2; }
.brand:hover { text-decoration: none; }
.topbar-user { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 26px; height: 26px; border-radius: 50%; }

.container { max-width: 1080px; margin: 1.4rem auto 3rem; padding: 0 1.2rem; }

/* --- komponenty --- */
.card {
    background: #fff; border: 1px solid #e3e6eb; border-radius: 10px;
    padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; border: 1px solid #c6ccd6; border-radius: 8px;
    padding: .42rem .9rem; font-size: .92rem; cursor: pointer; color: #1f2733;
}
.btn:hover { background: #f0f2f5; text-decoration: none; }
.btn-primary { background: #1b6ac9; border-color: #1b6ac9; color: #fff; }
.btn-primary:hover { background: #1558ab; }
.btn-ghost { background: transparent; border-color: #46536e; color: #cdd6e4; }
.btn-ghost:hover { background: #2a3750; }
.btn-google { border-color: #c6ccd6; font-weight: 600; padding: .55rem 1.1rem; }

.flash { border-radius: 8px; padding: .6rem 1rem; margin-bottom: 1rem; }
.flash-ok { background: #e2f4e5; border: 1px solid #9fd8ab; }
.flash-err { background: #fbe4e4; border: 1px solid #eba7a7; }

.muted { color: #68738a; }
.small { font-size: .85rem; }
.hidden { display: none; }
.count { background: #e3e6eb; border-radius: 10px; padding: 0 .5rem; font-size: .85rem; }

/* --- badge stavu a priority --- */
.badge {
    display: inline-block; border-radius: 20px; padding: .05rem .6rem;
    font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.st-new         { background: #e1edfb; color: #1b5bab; }
.st-in_progress { background: #fdf0d7; color: #94660a; }
.st-done        { background: #e2f4e5; color: #1d7a34; }
.st-closed      { background: #e8e9ee; color: #5b6373; }
.pr-low      { background: #eef0f3; color: #5b6373; }
.pr-normal   { background: #e1edfb; color: #1b5bab; }
.pr-high     { background: #fde3d2; color: #a34d0c; }
.pr-critical { background: #fbdada; color: #ab1f1f; }

/* --- hlavicky sekci, formulare --- */
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin: 1.4rem 0 .8rem; flex-wrap: wrap;
}
.form-grid { display: flex; flex-wrap: wrap; gap: .8rem; }
.form-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; color: #45506a; }
.form-grid .grow { flex: 1 1 220px; }
.form-grid .full { flex: 1 1 100%; }
.form-grid .check { flex-direction: row; align-items: center; gap: .45rem; }
input[type=text], input[type=email], input[type=date], input[type=search], select, textarea {
    border: 1px solid #c6ccd6; border-radius: 8px; padding: .45rem .6rem;
    font: inherit; background: #fff; width: 100%;
}
textarea { resize: vertical; }

/* --- dashboard --- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.project-card {
    background: #fff; border: 1px solid #e3e6eb; border-radius: 10px;
    padding: .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; color: inherit;
}
.project-card:hover { border-color: #1b6ac9; text-decoration: none; }
.project-card .code { color: #1b6ac9; font-weight: 700; font-size: .8rem; letter-spacing: .04em; }
.project-card p { margin: 0; font-size: .85rem; }
.archived { margin-top: 1.6rem; }

/* --- tabulka ukolu --- */
table.issues { width: 100%; border-collapse: collapse; }
table.issues th {
    text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
    color: #68738a; padding: .3rem .55rem; border-bottom: 1px solid #e3e6eb;
}
table.issues td { padding: .5rem .55rem; border-bottom: 1px solid #eef0f3; }
table.issues tr:last-child td { border-bottom: 0; }
table.issues tr:hover td { background: #f7f9fc; }
td.num a { font-weight: 600; white-space: nowrap; }
td.title { width: 55%; }
td.due.overdue { color: #ab1f1f; font-weight: 600; }

.filters { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters select, .filters input { width: auto; }
.filters input[type=search] { flex: 1 1 180px; }

.breadcrumb { font-size: .88rem; margin-bottom: .6rem; color: #68738a; }
.project-desc { margin: 0 0 1rem; }

/* --- detail ukolu --- */
.issue-key { color: #68738a; font-weight: 600; }
.issue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 1.2rem; margin-top: 1rem; }
.issue-side { align-self: start; display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 1rem; }
.issue-side label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: #45506a; }
.issue-desc { white-space: normal; }

.timeline { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.tl-event { font-size: .88rem; color: #45506a; padding-left: .2rem; }
.tl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c6ccd6; margin-right: .5rem; }
.tl-comment { background: #fff; border: 1px solid #e3e6eb; border-radius: 10px; }
.tl-comment .tl-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; border-bottom: 1px solid #eef0f3; background: #f7f9fc;
    border-radius: 10px 10px 0 0;
}
.tl-comment .tl-body { padding: .7rem .9rem; }
.comment-form { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.comment-form textarea { width: 100%; }

/* --- login --- */
.login-box {
    max-width: 380px; margin: 8vh auto; background: #fff; border: 1px solid #e3e6eb;
    border-radius: 12px; padding: 2rem; text-align: center;
    display: flex; flex-direction: column; gap: .9rem; align-items: center;
}
.login-box h1 { font-size: 1.3rem; }
.login-box hr { width: 100%; border: 0; border-top: 1px solid #e3e6eb; }
.dev-login { display: flex; flex-direction: column; gap: .5rem; width: 100%; }

@media (max-width: 760px) {
    .issue-layout { grid-template-columns: 1fr; }
    .issue-side { position: static; }
    td.title { width: auto; }
}
