/*table*/
#tableCont {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

#tableActions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: -6px;
    width: 100%;
}

/*table buttons*/
.tbl-btn {
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s;
}

.tbl-btn img {
    width: 20px;
    filter: invert(1) opacity(0.5);
    transition: filter 0.18s;
}

.tbl-btn:hover img { filter: invert(1) opacity(1); }

/*table rows*/
#projetTable {
    border-collapse: collapse;
    min-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

#projetTable tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

#projetTable tr:last-child { border-bottom: none; }
#projetTable tr:hover { background: rgba(123, 140, 222, 0.08); }

#projetTable td {
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    color: var(--muted);
    padding: 12px 20px;
    transition: color 0.15s;
}

#projetTable tr:hover td { color: var(--light); }

/*remove button*/
.td-remove {
    width: 0;
    padding: 0 !important;
    overflow: visible;
    white-space: nowrap;
}

.btn-remove {
    font-family: "DM Sans", sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    background: rgba(123, 140, 222, 0.12);
    border: 1px solid rgba(123, 140, 222, 0.25);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.18s, color 0.18s, border-color 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    margin-left: 12px;
    margin-right: 6px;
}

.btn-remove img {
    width: 12px;
    filter: invert(1) opacity(0.6);
    transition: filter 0.18s;
}

#projetTable tr:hover .btn-remove { opacity: 1; }

.btn-remove:hover {
    background: rgba(224, 92, 92, 0.18);
    border-color: rgba(224, 92, 92, 0.4);
    color: var(--light);
}

.btn-remove:hover img { filter: invert(1) opacity(1); }

/*edit button*/
.td-edit {
    width: 0;
    padding: 0 !important;
    overflow: visible;
    white-space: nowrap;
    text-align: right;
}

.btn-edit {
    font-family: "DM Sans", sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    background: rgba(123, 140, 222, 0.12);
    border: 1px solid rgba(123, 140, 222, 0.25);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.18s, color 0.18s, border-color 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    margin-right: 6px;
    text-decoration: none;
}

.btn-edit img {
    width: 12px;
    filter: invert(1) opacity(0.6);
    transition: filter 0.18s;
}

#projetTable tr:hover .btn-edit { opacity: 1; }

.btn-edit:hover {
    background: rgba(123, 140, 222, 0.22);
    border-color: rgba(123, 140, 222, 0.45);
    color: var(--light);
}

.btn-edit:hover img { filter: invert(1) opacity(1); }

/*empty state*/
.msg-cell {
    color: var(--muted);
    padding: 16px 20px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.92rem;
}

.msg-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.18s;
}

.msg-link:hover {
    color: var(--accent-2);
    text-decoration: underline;
}

/*dialog novy projekt*/
dialog#dialog-novy-projekt {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px 28px;
    color: var(--light);
    font-family: "DM Sans", sans-serif;
    min-width: 320px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

dialog#dialog-novy-projekt::backdrop {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

dialog#dialog-novy-projekt p {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

dialog#dialog-novy-projekt input[type="text"] {
    width: 100%;
    font-family: "DM Sans", sans-serif;
    font-size: 0.97rem;
    color: var(--light);
    background: rgba(22,26,48,0.8);
    border: 1px solid rgba(182,187,196,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    outline: none;
    margin-bottom: 20px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

dialog#dialog-novy-projekt input[type="text"]:focus {
    border-color: rgba(123,140,222,0.55);
    box-shadow: 0 0 0 3px rgba(123,140,222,0.12);
}

/*dialog buttons*/
.dialog-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.dialog-btns button {
    font-family: "DM Sans", sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

#btn-zrusit {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

#btn-zrusit:hover {
    background: rgba(182,187,196,0.07);
    border-color: rgba(182,187,196,0.3);
    color: var(--light);
}

#btn-vytvorit {
    background: rgba(123,140,222,0.18);
    border: 1px solid rgba(123,140,222,0.38);
    color: var(--light);
}

#btn-vytvorit:hover {
    background: rgba(123,140,222,0.28);
    border-color: rgba(123,140,222,0.6);
}
