:root{
    /* Říká Android WebView / iOS Safari, že stránka je tmavá — nepřepisuj
       defaultní pozadí form controls (textarea, input, select) na bílé.
       Bez toho měli někteří uživatelé v appce neviditelný text.
       "only" navíc ZAKÁŽE Androidu/Capacitor WebView vynucené ztmavení
       (force-dark), které u některých telefonů dělalo bílý text na bílém. */
    color-scheme: only dark;
    --tc-body-bg: #111;
    --tc-text-color: #eee;
    --tc-heading-color: #eee;
    --tc-link-color: #9fdcff;
    --tc-header-bg: #000;
    --tc-footer-bg: #000;
    --tc-footer-text-color: #888;
    --tc-footer-text-size: 14px;
    --tc-border-color: #333;
    --tc-accent: #ff1744;
    --tc-accent-hover: #ff4566;
    --tc-nav-link-color: var(--tc-link-color);
    --tc-nav-hover-color: #fff;
    --tc-nav-hover-bg: transparent;
    --tc-nav-radius: 10px;

    --tc-logo-height: 48px;

    --tc-input-bg: #111;
    --tc-input-color: #eee;
    --tc-input-border: #555;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--tc-body-bg);
    color: var(--tc-text-color);
    /* Android 16 / iOS: obsah se kresli pres cely displej -> odsadit od systemovych list.
       V beznem prohlizeci jsou tyto hodnoty 0, takze se vzhled nemeni. (30.7.2026) */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--tc-heading-color);
}

a {
    color: var(--tc-link-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.site-header {
    background: var(--tc-header-bg);
    border-bottom: 1px solid var(--tc-border-color);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-logo{
    height: var(--tc-logo-height);
    width: auto;
    display: block;
}
.site-title h1 {
    font-size: 20px;
    margin: 0;
}

/* Emoji picker (bez externích knihoven) */
.emoji-picker{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}
.emoji-btn{
    border:1px solid var(--tc-border-color);
    background:transparent;
    color:var(--tc-text-color);
    border-radius:10px;
    padding:6px 8px;
    line-height:1;
    cursor:pointer;
}
.emoji-btn:hover{
    border-color: var(--tc-accent);
}
.site-title p {
    margin: 0;
    font-size: 12px;
    color: #aaa;
}

.main-nav a {
    margin-left: 12px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--tc-menu-item-color, var(--tc-nav-link-color));
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--tc-nav-radius);
    line-height: 1;
}
.main-nav a:hover {
    color: var(--tc-nav-hover-color);
    background: var(--tc-nav-hover-bg);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: var(--tc-body-bg);
    color: var(--tc-text-color);
    border: 1px solid var(--tc-border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
}
.nav-toggle:hover {
    border-color: var(--tc-input-border);
}

/* Header right (lang + hamburger) */
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Language Switcher */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-current { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.06); border: 1px solid var(--tc-border-color, #333); color: var(--tc-accent, #ff1744); font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; transition: border-color 0.2s; line-height: 1; letter-spacing: 1px; }
.lang-current:hover { border-color: var(--tc-accent); }
.lang-arrow { font-size: 10px; opacity: 0.6; }
.lang-dropdown { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px; background: var(--tc-body-bg, #111); border: 1px solid var(--tc-border-color, #333); border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 200; }
.lang-dropdown.open { display: block; }
.lang-option { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: var(--tc-text-color); font-size: 14px; border-radius: 8px; transition: background 0.15s; }
.lang-option:hover { background: rgba(255,255,255,0.06); }
.lang-option.lang-active { background: rgba(255,23,68,0.15); color: var(--tc-accent) !important; font-weight: 700; }
.lang-option.lang-active .lang-flag { color: var(--tc-accent); }
.lang-option.lang-active .lang-name { color: var(--tc-accent); }
.lang-flag { font-size: 12px; font-weight: 700; line-height: 1; color: var(--tc-accent, #ff1744); letter-spacing: 1px; min-width: 20px; text-align: center; }
.lang-name { white-space: nowrap; }

.site-main .container,
.site-footer .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

.site-footer {
    font-size: var(--tc-footer-text-size);
    color: var(--tc-footer-text-color);
    background: var(--tc-footer-bg);
    padding: 12px 0;
}


h2 {
    margin-top: 0;
}

.form, .form-inline, .form-small {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}
.form-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.form label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
input[type="url"],
select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--tc-input-border, #555) !important;
    background: var(--tc-input-bg, #1a1a1a) !important;
    color: var(--tc-input-color, #fff) !important;
    -webkit-text-fill-color: var(--tc-input-color, #fff) !important;
    min-height: 44px;
    box-sizing: border-box;
}
button {
    padding: 8px 14px;
    border-radius: 4px;
    border: none;
    background: var(--tc-accent);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    min-height: 44px;
}
button:hover {
    background: var(--tc-accent-hover);
}

/* Obalovač tabulek – zabraňuje přetečení na mobilu */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th, .table td {
    border: 1px solid var(--tc-border-color);
    padding: 6px 8px;
}
.table th {
    background: #222;
}

.alert {
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}
.alert-error {
    background: #3b0000;
    border: 1px solid #ff5252;
}
.alert-success {
    background: #003b16;
    border: 1px solid #00e676;
}

.alert-info {
    background: #001e3b;
    border: 1px solid #40c4ff;
}

.calendar-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    table-layout: fixed;
    font-size: 13px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.calendar-nav span {
    font-weight: 700;
}
.calendar-nav a {
    text-decoration: none;
    padding: 6px 8px;
    border: 1px solid #222;
    border-radius: 6px;
    background: #0f0f0f;
}
.calendar-nav a:hover {
    border-color: #333;
}
.calendar th {
    border: 1px solid var(--tc-border-color);
    vertical-align: middle;
    padding: 4px 3px;
    height: 24px;
    line-height: 1.1;
    text-align: center;
    /* Černé pozadí pouze pro záhlaví dnů v týdnu */
    background: #000;
}
.calendar td {
    border: 1px solid var(--tc-border-color);
    vertical-align: top;
    padding: 4px;
    height: 76px; /* minimum – buňky se mohou zvětšit podle obsahu */
}
.calendar td.past-day,
.calendar td.empty {
    height: 36px;
}
.calendar .day-number {
    font-size: 12px;
    /* Barva data v kalendáři je nastavitelná v administraci (Nastavení webu). */
    color: var(--tc-calendar-date-color, #fff);
    margin-bottom: 2px;
    line-height: 1.05;
    white-space: nowrap;
}

.calendar .day-number .day-num {
    font-weight: 700;
    color: inherit;
}

.calendar .day-number .month-name {
    font-size: 11px;
    color: inherit;
    text-transform: lowercase;
}
.calendar .event-label {
    margin-top: 4px;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    color: #000;
    line-height: 1.15;
}
.calendar .today {
    /* Aktuální den chceme zvýraznit tmavým pozadím */
    background: #000;
}
.calendar .empty {
    /* Prázdná políčka (před/za měsícem) – nechat průhledné */
    background: transparent;
}
.event-admin .event-label.empty-label {
    background: #222;
    color: #ccc;
}
.color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 4px;
    border: 1px solid #000;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.flex-1 {
    flex: 1 1 280px;
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .main-nav { width: 100%; }
    .lang-dropdown { right: 0; }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        /*
          MOBILNÍ MENU (<= 768px)
          Pozadí je tmavé (shodné s hlavičkou), aby admin-nastavené barvy
          odkazů (designované pro tmavý motiv) zůstaly čitelné.
        */
        background: var(--tc-header-bg, #000);
        border-top: 1px solid var(--tc-border-color, #333);
        padding: 8px 0;
    }
    body.nav-open .main-nav {
        display: flex;
    }
    .main-nav a {
        margin: 0;
        padding: 10px 12px;
        border-bottom: 1px solid var(--tc-border-color, #333);
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Akce – kalendář: čitelný i na menších mobilech */
    .calendar-nav {
        justify-content: center;
    }
    .calendar-nav span {
        flex-basis: 100%;
        text-align: center;
        order: -1;
    }
    .calendar-nav a {
        flex: 1 1 140px;
        text-align: center;
        padding: 8px 6px;
        font-size: 13px;
    }
    .calendar {
        font-size: 12px;
        min-width: 560px;
    }
    .calendar th {
        padding: 3px 2px;
        height: 22px;
        font-size: 11px;
    }
    .calendar td {
        padding: 2px;
        height: 60px;
    }
    .calendar td.past-day,
    .calendar td.empty {
        height: 26px;
    }
    .calendar .day-number {
        font-size: 11px;
        margin-bottom: 1px;
        gap: 2px;
        flex-direction: column;
        align-items: flex-start;
    }
    .calendar .day-number .month-name {
        font-size: 10px;
    }
    .calendar td.past-day .day-number,
    .calendar td.empty .day-number {
        flex-direction: row;
        align-items: baseline;
    }
    .calendar .event-label {
        margin-top: 3px;
        padding: 3px 2px;
        font-size: 11px;
        border-radius: 4px;
        text-align: left;
        /* Nezkracovat názvy akcí – raději zalamovat */
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.1;
    }
    .event-label .event-time {
        margin-right: 2px;
    }

    /* Fórum – menší odsazení na mobilu */
    .forum-post {
        max-width: 100%;
    }
    .forum-post[style*="margin-left"] {
        margin-left: 0 !important;
        padding-left: 10px;
        border-left: 3px solid var(--tc-border-color, #333);
    }
}


@media (max-width: 360px) {
    /* Extra malé mobily – ještě kompaktnější kalendář */
    .calendar {
        font-size: 11px;
        min-width: 560px;
    }
    .calendar th {
        height: 20px;
        font-size: 10px;
    }
    .calendar td {
        padding: 1px;
    }
    .calendar .day-number {
        font-size: 10px;
    }
    .calendar .event-label {
        font-size: 10px;
        padding: 2px;
    }
}


.profile {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.profile-sidebar {
    flex: 0 0 220px;
    max-width: 100%;
}
.profile-main {
    flex: 1 1 300px;
}
.profile-photo {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #333;
    object-fit: cover;
    background: #000;
}
.profile-photo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #777;
    height: 200px;
}
.photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.photo-item {
    border: 1px solid var(--tc-border-color);
    padding: 6px;
    border-radius: 6px;
    max-width: 180px;
}
.photo-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}
.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.forum-post {
    border-radius: 6px;
    padding: 8px;

    /* Glass effect */
    background: rgba(20, 20, 20, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.forum-post-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: #aaa;
}
.forum-post-body {
    font-size: 14px;
}
textarea {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--tc-input-border, #555) !important;
    background: var(--tc-input-bg, #1a1a1a) !important;
    color: var(--tc-input-color, #fff) !important;
    -webkit-text-fill-color: var(--tc-input-color, #fff) !important;
    box-sizing: border-box;
}
.flex {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.flex-1 {
    flex: 1 1 300px;
}


/* Calendar event time label */
.event-label .event-time {
    font-weight: 600;
    margin-right: 4px;
}

/* Admin calendar small button + inline form */
.inline-form {
    display: inline-block;
    margin-left: 4px;
}
.btn-small {
    font-size: 11px;
    padding: 0 4px;
    line-height: 1.2;
}

/* Time inputs in admin forms */
.time-input {
    width: 70px;
    margin-left: 4px;
}

/* Legend of events */
.event-legend {
    margin-top: 24px;
}
.event-legend ul {
    list-style: none;
    padding: 0;
}
.event-legend li {
    margin-bottom: 4px;
}
.color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Opening hours table */
.table.opening-hours th,
.table.opening-hours td {
    vertical-align: middle;
}

.calendar td.past-day { opacity: 0.25; }


.promo-banner {
    margin: 10px 0 20px 0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px dashed #f5c842;
    background: #2a1b00;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

.index-opening-info {
    margin-bottom: 20px;
    padding: 10px 12px;
    border-radius: 4px;
    background: #102010;
    border: 1px solid #2f5f2f;
    font-size: 14px;
    font-weight: 500;
}

/* Když je zavřeno, chceme stejný "badge" styl, jen do červena */
.index-opening-info.closed {
    background: #201010;
    border: 1px solid #5f2f2f;
}

.event-legend-notes {
    margin-top: 8px;
    font-size: 13px;
}
.event-legend-notes li {
    list-style: disc;
    margin-left: 20px;
}

.opening-color-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px;border:1px solid #555;vertical-align:middle;}

.page-content{margin-top:10px;font-size:14px;line-height:1.5;}
.page-content p{margin-bottom:0.6em;}

/* Badges v navigaci pro upozornění (přátelé / registrace) */
.nav-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    background: var(--tc-accent);
    color: #fff;
}

@keyframes navBadgeBlink {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-1px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nav-badge-blink {
    animation: navBadgeBlink 1s infinite;
}

/* Chat online badge – zelený, bez blikání */
.nav-badge-chat {
    background: #22c55e;
    color: #fff;
}


/* Ankety */
.poll-box {
    margin-top: 20px;
    padding: 15px;
    background: #1d1d1d;
    border-radius: 8px;
}
.poll-box h2 {
    margin-top: 0;
}
.poll-form .poll-option {
    display: block;
    margin-bottom: 4px;
}
.poll-results ul {
    list-style: none;
    padding-left: 0;
}
.poll-bar {
    background: #333;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    display: inline-block;
    min-width: 80px;
    vertical-align: middle;
}
.poll-bar-fill {
    height: 100%;
    background: #9fdcff;
}



/* Ankety – admin detail */
.poll-admin-details{
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.poll-admin-details > summary{
    cursor: pointer;
    font-weight: 700;
    color: #ddd;
    list-style: none;
}
.poll-admin-details > summary::-webkit-details-marker{ display:none; }
.poll-admin-body{ margin-top: 10px; display:flex; flex-direction:column; gap: 10px; }
.poll-admin-option{
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.06);
}
.poll-admin-option-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.poll-admin-count{ font-size: 12px; color:#aaa; }
.poll-voter-list{
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    flex-direction:column;
    gap: 6px;
}
.poll-voter-list li{
    font-size: 13px;
    color:#ddd;
    display:flex;
    flex-wrap:wrap;
    gap: 8px;
    align-items:baseline;
}
.poll-voter-username{ color:#aaa; font-size: 12px; }
.poll-voter-time{ color:#aaa; font-size: 12px; margin-left:auto; }
/* Formulář viditelnosti fotek v profilu */
.photo-visibility-form {
    margin-top: 4px;
    font-size: 13px;
}
.photo-visibility-form select {
    max-width: 180px;
}


/* Profily – vyhledávání a mřížka */
.profile-search-form {
    margin-bottom: 20px;
}
.profile-search-form .form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}
.profile-card {
    border: 1px solid #444;
    padding: 10px;
    border-radius: 4px;
    background: #111;
}
.profile-card h3 {
    margin-top: 0;
    margin-bottom: 4px;
}
.profile-card-username {
    font-size: 12px;
    color: #aaa;
    margin-top: 0;
}
.profile-card-meta {
    list-style: none;
    padding: 0;
    margin: 5px 0 5px 0;
    font-size: 13px;
}
.profile-card-meta li {
    margin: 0 0 2px 0;
}
.profile-card-looking,
.profile-card-bio {
    font-size: 13px;
    margin: 5px 0;
}


/* Miniatura profilové fotky v přehledu profilů */
.profile-card-thumb-wrap {
    text-align: center;
    margin-bottom: 6px;
}
.profile-card-thumb {
    max-width: 100%;
    max-height: 120px;
    border-radius: 4px;
    object-fit: cover;
}
.profile-search-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 5px 0 10px 0;
    font-size: 14px;
}


/* --- Avatary (přátelé / fórum) --- */
.tc-avatar{
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #2a2a2a;
}
.tc-avatar-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    color:#fff;
    font-size:16px;
    background: var(--tc-accent);
}


/* --- Online/offline stav --- */
.tc-status-dot{
    display:inline-block;
    width:9px;
    height:9px;
    border-radius:50%;
    margin-right:6px;
    border:1px solid #444;
    vertical-align:middle;
}
.tc-status-dot.online{ background:#1eea2a; }
.tc-status-dot.offline{ background:#e11d48; }

.friend-profile-link{
    color: inherit;
    text-decoration: none;
}
.friend-profile-link:hover{
    text-decoration: underline;
}

/* Profil – přátelé na profilu */
.profile-friends-grid{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:8px;
}
.profile-friend{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 8px;
    border-radius:10px;
    background: rgba(255,255,255,0.03);
    color: inherit;
    text-decoration:none;
}
.profile-friend:hover{
    background: rgba(255,255,255,0.06);
}
.profile-friend-name{
    font-size:14px;
    line-height:1.2;
}
.profile-last-seen{
    margin-top:8px;
    font-size:13px;
    color:#aaa;
}
.friends-list .friend-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
}
.friends-list .friend-left{ flex:0 0 auto; }
.friends-list .friend-right{ flex:1 1 auto; }
.friends-list form{ margin-left: 8px; }

/* --- Friends page (cards) --- */
.tc-friends-grid{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}
@media (max-width: 900px){
    .tc-friends-grid{ grid-template-columns: 1fr; }
}
.tc-card{
    border-radius: 10px;
    padding: 12px;
    background: rgba(20, 20, 20, 0.32);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.tc-card-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.tc-card-head h3{ margin:0; }
.tc-card-sub{
    font-size: 12px;
    color: #aaa;
}
.tc-card-divider{
    height:1px;
    background: rgba(255,255,255,0.08);
    margin: 12px 0;
}
.muted{ color:#aaa; }

.tc-friend-cards{
    display:flex;
    flex-direction:column;
    gap: 10px;
}
.tc-friend-card{
    display:flex;
    align-items:center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}
.tc-friend-avatar{ flex:0 0 auto; text-decoration:none; }
.tc-friend-avatar .tc-avatar{ width:46px; height:46px; }
.tc-friend-main{ flex: 1 1 auto; min-width: 0; }
.tc-friend-title{
    font-weight: 700;
    display:flex;
    align-items:center;
    gap: 6px;
    line-height: 1.2;
}
.tc-friend-meta{
    margin-top: 3px;
    font-size: 12px;
    color:#aaa;
    display:flex;
    align-items:center;
    gap: 6px;
    flex-wrap:wrap;
}
.tc-dot-sep{ opacity: .6; }
.tc-friend-actions{ flex:0 0 auto; }
.tc-inline-actions{ display:flex; gap: 8px; }

button.btn-secondary{
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
}
button.btn-danger{
    background: rgba(225,29,72,0.18);
    border: 1px solid rgba(225,29,72,0.45);
    color: #ffd6de;
}
button.btn-secondary:hover{ background: rgba(255,255,255,0.12); }
button.btn-danger:hover{ background: rgba(225,29,72,0.25); }


.forum-post-header{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.forum-avatar{
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display:block;
}
.forum-avatar-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    color:#fff;
    font-size:14px;
    background: var(--tc-accent);
}

/* --- Kalendář akcí: čas nad názvem --- */
.event-label .event-time{
    display:block;
    font-weight:700;
    font-size: 12px;
    line-height: 1.1;
    margin-bottom: 2px;
}
.event-label .event-name{
    display:block;
    font-size: 12px;
    line-height: 1.15;
}
.day-number{
    white-space: nowrap;
}

.required-marker{ color:#e11d48; font-weight:700; }


/* --- Reply preview blocks (PM / fórum) --- */
.reply-preview{border:1px solid rgba(0,0,0,.12);background:rgba(0,0,0,.02);padding:12px;border-radius:10px;margin:0 0 12px 0;}
.reply-preview-title{font-weight:700;margin:0 0 6px 0;}
.reply-preview-meta{font-size:.9em;opacity:.85;margin:0 0 8px 0;}
.reply-preview-body{white-space:pre-wrap;}

/* Soukromé zprávy – ikona odpovědi v seznamu */
.pm-reply-link{display:inline-block;margin-right:6px;text-decoration:none;opacity:.75;}
.pm-reply-link:hover{opacity:1;}

/* --- TunelClub: galerie / lightbox --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--tc-border-color);
    cursor: zoom-in;
    display: block;
}

.gallery .tc-gallery-item{
    position: relative;
    display: block;
    line-height: 0;
}
.gallery .tc-photo-badge{
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(0,0,0,0.62);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    line-height: 1;
}

/* Profilová fotka – zmenšit, ale kliknutím zobrazit ve full size */
.profile-photo {
    width: 220px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    cursor: zoom-in;
}

/* Sjednotit klikatelnost fotek v profilu */
.photos-grid img,
.profile-card-thumb {
    cursor: zoom-in;
}

/* Lightbox overlay */
#tcLightboxOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.86);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
}
#tcLightboxOverlay.open { display: flex; }
#tcLightboxOverlay img {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
#tcLightboxOverlay .tcLightboxClose {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    right: calc(14px + env(safe-area-inset-right));
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}
#tcLightboxOverlay .tcLightboxClose:hover {
    background: rgba(255,255,255,0.18);
}

/* Reactions (like/dislike) */
.tc-reactions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.tc-reactions-compact {
    gap: 6px;
    margin-top: 6px;
}
.tc-reaction-form { margin: 0; }
.tc-reaction-btn {
    border: 1px solid rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1;
}
.tc-reaction-btn:hover { background: rgba(255,255,255,1); }
.tc-reaction-btn.active {
    border-color: rgba(0,0,0,0.35);
    background: rgba(255,240,200,0.95);
}
.tc-reaction-btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.tc-reaction-count {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
}
.tc-reaction-count a { text-decoration: none; }

.tc-reaction-users {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.tc-reaction-user {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    background: rgba(255,255,255,0.75);
    text-decoration: none;
}
.tc-reaction-user:hover { background: rgba(255,255,255,0.95); }
.tc-reaction-user-name { color: #111; }

.tc-gallery-card {
    display: flex;
    flex-direction: column;
}
.forum-post-reactions { margin-top: 10px; }

.tc-profile-reactions {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    background: rgba(255,255,255,0.65);
}

/* Simple button links (admin helpers) */
.button{
  display:inline-block;
  padding:8px 12px;
  border-radius:8px;
  background: var(--tc-accent);
  color:#fff !important;
  text-decoration:none;
  font-weight:700;
  margin-right:8px;
}
.button:hover{ background: var(--tc-accent-hover); }


/* --- TC Box layout (profil) --- */
.tc-box{
    border: 1px solid var(--tc-border-color);
    background: #0f0f0f;
    border-radius: 14px;
    padding: 12px 12px;
    margin-bottom: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
.tc-box-title{
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 15px;
}
.tc-box-text{
    font-size: 14px;
    line-height: 1.45;
}
.tc-profile-layout{
    align-items: flex-start;
}
.tc-profile-sidebar{
    flex: 0 0 260px;
    max-width: 100%;
}
.tc-profile-photo-box{
    text-align: center;
}
.tc-profile-username{
    margin-top: 8px;
    font-size: 13px;
    color: #aaa;
}
.tc-profile-main-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.tc-rating-meta{
    margin-top: 8px;
    font-size: 13px;
}
.tc-visits-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.tc-visits-subtitle{
    margin-bottom: 8px;
}
.tc-reaction-user-meta{
    font-size: 12px;
    color: #aaa;
}

/* pseudo button link (použito v kartách a akcích) */
.tc-btn-link{
    display: inline-block;
    padding: 8px 10px;
    border: 1px solid var(--tc-border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--tc-link-color);
    background: transparent;
}
.tc-btn-link:hover{
    border-color: var(--tc-accent);
    color: #fff;
}

/* jemné doladění starších bloků na profilu */
.profile-photo{
    border-radius: 14px;
}

/* --- Vzhled karet ve výpisu profilů --- */
.profile-card{
    border: 1px solid var(--tc-border-color);
    padding: 14px;
    border-radius: 14px;
    background: #0f0f0f;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.profile-card:hover{
    transform: translateY(-2px);
    border-color: #555;
    box-shadow: 0 14px 35px rgba(0,0,0,.35);
}
.profile-card h3{
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 18px;
}
.profile-card-username{
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #aaa;
}
.profile-card-thumb-wrap{
    text-align: center;
    margin-bottom: 10px;
}
.profile-card-thumb{
    max-width: 100%;
    max-height: 140px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--tc-border-color);
}
.profile-card-meta{
    list-style: none;
    padding: 0;
    margin: 10px 0 10px 0;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.profile-card-meta li{
    margin: 0;
    border: 1px solid var(--tc-border-color);
    background: #141414;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
}
.profile-card-looking,
.profile-card-bio{
    font-size: 13px;
    line-height: 1.4;
}
.tc-profile-rating{
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tc-profile-rating a{
    text-decoration: none;
    border: 1px solid var(--tc-border-color);
    border-radius: 999px;
    padding: 4px 8px;
}
.tc-profile-rating a:hover{
    border-color: var(--tc-accent);
}
.tc-profile-rating-meta{
    color: #aaa;
}

/* responsivní: profil do jednoho sloupce */
@media (max-width: 720px){
    .tc-profile-sidebar{
        flex: 1 1 100%;
    }
}

/* --- Forum composer layout fixes --- */
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea {
    width: 100%;
    box-sizing: border-box;
}

.emoji-picker {
    max-width: 100%;
}

/* --- Forum list cards (restored) --- */
.forum-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.forum-card{
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.forum-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.30);
  border-color: rgba(255,255,255,0.16);
  text-decoration: none;
}

.forum-card-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.forum-card-title{
  font-size: 18px;
  font-weight: 800;
  color: #ff9a2f;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forum-card-desc{
  margin-top: 8px;
  line-height: 1.35;
  color: rgba(255,255,255,0.90);
}

.forum-card-desc.muted{
  opacity: .75;
}

.forum-card-meta{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.forum-count-badge{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  font-weight: 700;
  min-width: 78px;
  text-align: center;
}

.forum-count-sep{
  opacity: .75;
  padding: 0 4px;
}

.forum-lock-badge{
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
}



/* Forum: štítek Nový */
.forum-new-badge{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1.4;
  color:#ffffff;
  background:rgba(255,59,59,0.95);
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:0 2px 10px rgba(0,0,0,0.25);
  text-transform:none;
}


/* =========================
   ADMIN LAYOUT (sidebar)
   ========================= */
.admin-layout{
    display:flex;
    align-items:flex-start;
    gap:16px;
}

.admin-sidebar{
    width:260px;
    flex:0 0 260px;
    position: sticky;
    top: 16px;
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.25);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.admin-sidebar-head{
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--tc-border-color);
    background: rgba(255,255,255,0.03);
}
.admin-sidebar-title{
    font-weight: 800;
    letter-spacing: 0.5px;
}
.admin-sidebar-sub{
    margin-top: 3px;
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-nav{
    padding: 8px;
}
.admin-nav-section{
    margin-bottom: 10px;
}
.admin-nav-section-title{
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 6px 4px;
}
.admin-nav-link{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap:10px;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--tc-link-color);
    text-decoration: none;
    border: 1px solid transparent;
}
.admin-nav-link:hover{
    text-decoration:none;
    border-color: var(--tc-border-color);
    background: rgba(255,255,255,0.04);
}
.admin-nav-link.is-active{
    border-color: rgba(255,255,255,0.20);
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.admin-sidebar-foot{
    padding: 10px 8px;
    border-top: 1px solid var(--tc-border-color);
    background: rgba(255,255,255,0.02);
}

.admin-main{
    flex:1;
    min-width: 0;
    overflow-x: auto;
}

/* Viditelnost podle viewportu — pro mobile cards alternativy k tabulkam */
.tc-desktop-only{ display: block; }
.tc-mobile-only{ display: none; }
@media (max-width: 900px){
    .tc-desktop-only{ display: none !important; }
    .tc-mobile-only{ display: block !important; }
}

/* Calendar mobile (list dnů s akcemi) */
.calendar-mobile{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.calendar-mobile-day{
    border: 1px solid var(--tc-border-color, #333);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    padding: 10px 12px;
}
.calendar-mobile-date{
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--tc-border-color, #333);
}
.calendar-mobile-date strong{ font-size: 16px; color: #fff; }
.calendar-mobile-date .dow{ font-size: 13px; color: #a1a1aa; text-transform: uppercase; letter-spacing: 0.5px; }
.calendar-mobile-events{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.calendar-mobile-event{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-left: 4px solid #888;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
}
.calendar-mobile-event-text{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}
.calendar-mobile-event-time{
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.calendar-mobile-event-name{
    color: #d4d4d8;
    word-break: break-word;
}
.calendar-mobile-event .tc-btn{
    flex-shrink: 0;
    min-width: 36px;
    padding: 4px 10px;
    font-size: 16px;
    line-height: 1;
}
.calendar-mobile-empty{
    padding: 20px;
    text-align: center;
    color: #a1a1aa;
    border: 1px dashed var(--tc-border-color, #333);
    border-radius: 12px;
}

/* Calendar mobile — "Pridat akci" panel */
.calendar-mobile-add-panel{
    margin-bottom: 14px;
    border: 1px solid var(--tc-border-color, #333);
    border-radius: 12px;
    background: rgba(59,130,246,0.06);
    padding: 8px 12px;
}
.calendar-mobile-add-panel > summary{
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #93c5fd;
    padding: 6px 0;
    list-style: none;
}
.calendar-mobile-add-panel > summary::-webkit-details-marker{ display: none; }
.calendar-mobile-add-panel[open] > summary{ margin-bottom: 8px; border-bottom: 1px solid var(--tc-border-color, #333); padding-bottom: 8px; }
.calendar-mobile-add-form{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.calendar-mobile-add-form label{
    font-size: 13px;
    color: #a1a1aa;
}
.calendar-mobile-add-form select,
.calendar-mobile-add-form input[type="time"]{
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--tc-input-border, #333);
    background: var(--tc-card-bg, #18181b);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
}
.calendar-mobile-add-times{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Admin v mobilu: tabulky se nepretahuji viewport, inputy a labely se prizpusobi */
@media (max-width: 900px){
    .admin-main table{
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-main table td,
    .admin-main table th{ white-space: nowrap; }
    /* Inline formulare v adminu nech zalamovat */
    .admin-main form[style*="display:flex"],
    .admin-main form[style*="display: flex"]{ flex-wrap: wrap !important; }
    /* Inputy a selecty se ridi rodicovskym kontejnerem */
    .admin-main input[type="text"],
    .admin-main input[type="email"],
    .admin-main input[type="number"],
    .admin-main input[type="url"],
    .admin-main input[type="search"],
    .admin-main input[type="password"],
    .admin-main select,
    .admin-main textarea{ max-width: 100%; box-sizing: border-box; }
    /* Labely s min-width zlikvidovat na mobilu, aby formular sel na sirku */
    .admin-main label[style*="min-width"]{ min-width: 0 !important; width: 100%; display: block; }
}

/* mobil: sidebar jde nahoru a obsah pod něj */
@media (max-width: 900px){
    .admin-layout{ flex-direction: column; }
    .admin-sidebar{
        width: 100%;
        flex: 0 0 auto;
        position: static;
        max-height: none;
        overflow: visible;
    }
    /* Drawer-style UX: na podstránkách menu skryto, místo něj "Zpět" tlačítko.
       Na admin index naopak menu plné, tlačítko skryto. */
    .admin-page-sub .admin-sidebar{ display: none; }
    .admin-page-index .admin-back-link{ display: none; }
}
@media (min-width: 901px){
    .admin-back-link{ display: none; }
}

.admin-back-link{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--tc-border-color);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: var(--tc-link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.admin-back-link:hover{
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-color: rgba(255,255,255,0.20);
    text-decoration: none;
}

/* =========================
   ADMIN – mobilní kartičky (pending users + photos)
   ========================= */

/* Skrýt kartičky na desktopu, tabulku na mobilu */
.tc-pending-cards{ display: none; }
.tc-users-cards{ display: none; }
.tc-photo-cards{ display: none; }

/* Kartičky uživatelů — vždy viditelné (desktop grid + mobil sloupec) */
.tc-users-cards--always{
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px){
    .tc-desktop-only{ display: none !important; }
    .tc-pending-cards{ display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
    .tc-users-cards--always{ grid-template-columns: 1fr; }
    .tc-photo-cards{ display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
}

.tc-pending-card{
    border: 1px solid var(--tc-border-color, #444);
    border-radius: 12px;
    background: rgba(20,20,20,0.95);
    overflow: hidden;
}
.tc-pending-card-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    border-bottom: 1px solid var(--tc-border-color, #444);
    font-size: 15px;
}
.tc-pending-card-id{
    color: #888;
    font-size: 12px;
}
.tc-pending-card-body{
    padding: 8px 12px;
}
.tc-pending-card-row{
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.4;
    flex-wrap: wrap;
}
.tc-pending-card-label{
    color: #999;
    min-width: 90px;
    flex-shrink: 0;
}
.tc-pending-card-actions{
    padding: 10px 12px;
    border-top: 1px solid var(--tc-border-color, #333);
    background: rgba(255,255,255,0.02);
}
.tc-pending-card-actions form{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Akční tlačítka */
.tc-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    color: #d4d4d8;
    border-color: rgba(255,255,255,0.10);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-align: center;
}
.tc-btn:hover{
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.20);
}
.tc-btn-approve{
    background: #166534;
    color: #fff;
    border-color: transparent;
}
.tc-btn-approve:hover{ background: #15803d; color: #fff; border-color: transparent; }
.tc-btn-block{
    background: #7c2d12;
    color: #fff;
    border-color: transparent;
}
.tc-btn-block:hover{ background: #9a3412; color: #fff; border-color: transparent; }
.tc-btn-delete{
    background: rgba(127,29,29,0.25);
    color: #fca5a5;
    border-color: rgba(127,29,29,0.60);
}
.tc-btn-delete:hover{ background: #7f1d1d; color: #fff; border-color: #7f1d1d; }
.tc-btn-edit{
    background: rgba(59,130,246,0.12);
    color: #93c5fd;
    border-color: rgba(59,130,246,0.30);
}
.tc-btn-edit:hover{ background: rgba(59,130,246,0.25); color: #fff; border-color: rgba(59,130,246,0.50); }
.tc-btn-email{
    background: rgba(168,85,247,0.12);
    color: #d8b4fe;
    border-color: rgba(168,85,247,0.30);
}
.tc-btn-email:hover{ background: rgba(168,85,247,0.25); color: #fff; border-color: rgba(168,85,247,0.50); }

/* Photo pending grid (kartičky pro schvalování) */
.tc-photo-pending-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 200px));
    gap: 10px;
    margin-bottom: 16px;
}
.tc-photo-card{
    border: 1px solid var(--tc-border-color, #333);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    overflow: hidden;
}
.tc-photo-card--pending{
    border-color: #854d0e;
    background: rgba(120,80,0,0.08);
}
.tc-photo-card-img{
    text-align: center;
    padding: 8px;
    background: rgba(0,0,0,0.3);
}
.tc-photo-card-img img{
    max-width: 100%;
    max-height: 160px;
    border-radius: 6px;
    object-fit: contain;
}
.tc-photo-card-info{
    padding: 8px 12px;
    font-size: 13px;
}
.tc-photo-card-meta{
    color: #999;
    font-size: 12px;
    margin-top: 2px;
}

/* Mobil: kompaktní seznam fotek (řádky s thumbnailem) */
.tc-photo-list-mobile{ display: none; }
@media (max-width: 900px){
    .tc-photo-list-mobile{
        display: flex;
        flex-direction: column;
        gap: 1px;
        background: var(--tc-border-color, #333);
        border: 1px solid var(--tc-border-color, #333);
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 16px;
    }
}
.tc-photo-row{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(17,17,17,0.95);
}
.tc-photo-row-thumb{
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.tc-photo-row-info{
    flex: 1;
    min-width: 0;
    font-size: 13px;
}
.tc-photo-row-info strong{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-photo-row-actions{
    flex-shrink: 0;
}
.tc-btn-sm{
    padding: 6px 10px;
    border: 1px solid #7f1d1d;
    border-radius: 6px;
    background: #450a0a;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
}
.tc-btn-sm:hover{ background: #7f1d1d; color: #fff; }

@media (max-width: 900px){
    .tc-photo-pending-grid{
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .tc-photo-card-img img{
        max-height: 120px;
    }
}

/* Mobilní kartičky pro zprávy */
.tc-msg-cards{ display: none; }
@media (max-width: 900px){
    .tc-msg-cards{
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }
}
.tc-msg-card{
    border: 1px solid var(--tc-border-color, #333);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}
.tc-msg-card--unread{
    border-color: #854d0e;
    background: rgba(120,80,0,0.06);
}
.tc-msg-card-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--tc-border-color, #333);
    font-size: 13px;
    gap: 8px;
}
.tc-msg-card-arrow{ color: #666; margin: 0 2px; }
.tc-msg-card-badge{
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
.tc-msg-card--unread .tc-msg-card-badge{
    background: rgba(234,179,8,0.15);
    color: #facc15;
}
.tc-msg-card-body{
    padding: 8px 12px;
}
.tc-msg-card-subject{
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}
.tc-msg-card-snippet{
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tc-msg-card-footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid var(--tc-border-color, #333);
}

/* Mobilní kartičky pro bany */
.tc-ban-cards{ display: none; }
@media (max-width: 900px){
    .tc-ban-cards{
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }
}
.tc-ban-inactive{
    opacity: 0.5;
}

/* =========================
   DASHBOARD (admin/index.php)
   ========================= */
.tc-muted{
    color: #aaa;
    font-size: 14px;
}

/* Dashboard KPI grid */
.tc-dash-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.tc-dash-card{
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 12px;
    background: rgba(255,255,255,0.02);
    text-decoration: none;
    color: inherit;
    display: block;
}
.tc-dash-card:hover{ background: rgba(255,255,255,0.05); text-decoration: none; }
.tc-dash-card-strong{
    border-color: var(--tc-accent, #ff1744);
    background: rgba(255,23,68,0.06);
}
.tc-dash-card-strong:hover{ background: rgba(255,23,68,0.12); }
.tc-dash-kpi{
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}
.tc-dash-label{
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}
.tc-dash-sub{
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Dashboard split (panely pod KPI) */
.tc-dash-split{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}
.tc-dash-panel{
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
}
.tc-dash-panel h3{
    margin: 0 0 10px;
    font-size: 15px;
}

/* Dashboard list (akce, fórum) */
.tc-dash-list{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tc-dash-list-row{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tc-dash-list-row:last-child{ border-bottom: none; }
.tc-dash-list-main{ flex: 1; min-width: 0; }
.tc-dash-list-title{ font-size: 13px; font-weight: 600; }
.tc-dash-list-sub{ font-size: 12px; color: #999; }
.tc-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    flex-shrink: 0;
}

/* Dashboard health */
.tc-dash-health{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.tc-dash-health-row{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}
.tc-dash-health-label{ flex: 1; }
.tc-dash-health-value{ color: #ccc; }
.tc-health-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tc-health-dot.ok{ background: #22c55e; }
.tc-health-dot.bad{ background: #ef4444; }

/* Dashboard actions */
.tc-dash-actions{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Log form + tail */
.tc-log-form{
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tc-log-tail{
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    max-height: 300px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.4;
}

/* Traffic KPIs (dashboard widget) */
.tc-traffic-kpis{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tc-traffic-kpi{
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    min-width: 100px;
}
.tc-traffic-kpi-num{
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}
.tc-traffic-kpi-lbl{
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Pill badges */
.pill{
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}
.pill-ok{ background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.3); color: #4ade80; }
.pill-warn{ background: rgba(234,179,8,0.15); border-color: rgba(234,179,8,0.3); color: #facc15; }
.pill-muted{ background: rgba(255,255,255,0.05); color: #999; }

/* Compact table variant */
.tc-table-compact th,
.tc-table-compact td{ padding: 6px 8px; }

/* Dashboard responsive */
@media (max-width: 600px){
    .tc-dash-grid{
        grid-template-columns: repeat(2, 1fr);
    }
    .tc-dash-kpi{ font-size: 22px; }
    .tc-dash-split{
        grid-template-columns: 1fr;
    }
    .tc-traffic-kpis{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================
   DASHBOARD – tabulky / logy / návštěvnost
   ========================= */
/* Admin tabulky – obalovač pro mobilní overflow */
.tc-table-wrap{ width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tc-table{ width: 100%; border-collapse: collapse; }
.tc-table th,
.tc-table td{ padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; vertical-align: top; }
.tc-table th{ font-size: 12px; color: #aaa; font-weight: 700; letter-spacing: 0.02em; }
.tc-table td{ font-size: 13px; }
.tc-table tr:hover td{ background: rgba(255,255,255,0.03); }

.tc-kpi-row{ display:flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.tc-kpi{ border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 10px 12px; background: rgba(255,255,255,0.02); min-width: 150px; }
.tc-kpi .v{ font-size: 22px; font-weight: 900; line-height: 1.1; }
.tc-kpi .l{ font-size: 12px; color: #aaa; margin-top: 4px; }

.tc-log-toolbar{ display:flex; gap: 10px; align-items:center; flex-wrap: wrap; margin-bottom: 10px; }
.tc-select{ padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.20); color: inherit; }
.tc-log-box{ border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; background: rgba(0,0,0,0.22); padding: 10px 12px; max-height: 340px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; white-space: pre-wrap; }


/* =========================
   TRAFFIC DETAIL (admin/traffic.php)
   ========================= */
.tc-admin-page-head{
    display:flex;
    align-items:baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tc-traffic-controls{
    margin-top: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.16);
    padding: 10px;
}
.tc-traffic-controls-row{
    display:flex;
    gap: 12px;
    flex-wrap: wrap;
}
.tc-control label{
    display:block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.tc-inline-form{
    display:flex;
    gap: 8px;
    align-items:center;
}
.tc-pillbar{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tc-pill{
    appearance:none;
    border: 1px solid var(--tc-border-color);
    background: rgba(255,255,255,0.02);
    color: var(--tc-link-color);
    padding: 7px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    text-decoration:none;
}
.tc-pill:hover{ background: rgba(255,255,255,0.05); text-decoration:none; }
.tc-pill.is-active{
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.20);
    color: #fff;
}

.tc-chart-wrap{
    border: 1px solid var(--tc-border-color);
    border-radius: 18px;
    background: rgba(0,0,0,0.18);
    padding: 12px;
    position: relative;
}
.tc-chart-note{
    margin-top: 8px;
}
#tcTrafficChart{
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Karty sociálních sítí (Instagram apod.) */
.tc-social-cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.tc-social-card{
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.18);
    padding: 14px 16px;
}
.tc-social-card.is-instagram{
    border-color: rgba(225,48,108,0.55);
    background: linear-gradient(160deg, rgba(225,48,108,0.16), rgba(0,0,0,0.18));
}
.tc-social-card-top{
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 6px;
}
.tc-social-ico{ font-size: 20px; line-height: 1; }
.tc-social-name{ font-size: 15px; }
.tc-social-big{
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}
.tc-social-sub{
    font-size: 12.5px;
    color: rgba(255,255,255,0.72);
    margin-top: 2px;
}

/* Dlaždice zdrojů návštěvnosti (klikací → detail) */
.tc-source-cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 6px;
}
.tc-source-grouphead{
    margin: 16px 0 8px;
    font-size: 15px;
}
.tc-source-card{
    display: block;
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.18);
    padding: 13px 15px;
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.tc-source-card:hover{
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.05);
}
.tc-source-card-top{
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 6px;
}
.tc-source-ico{ font-size: 19px; line-height: 1; }
.tc-source-name{ font-size: 14.5px; }
.tc-source-big{ font-size: 27px; font-weight: 800; line-height: 1.1; }
.tc-source-sub{ font-size: 12px; color: rgba(255,255,255,0.72); margin-top: 2px; }
.tc-source-detail{ font-size: 11.5px; color: rgba(255,255,255,0.5); margin-top: 7px; }
.tc-source-card:hover .tc-source-detail{ color: var(--tc-link-color, #7db8ff); }
.tc-source-card.cat-summary{ background: rgba(90,140,255,0.10); }
.tc-source-card.cat-search{ border-left: 3px solid rgba(90,176,255,0.70); }
.tc-source-card.cat-social{ border-left: 3px solid rgba(225,48,108,0.60); }
.tc-source-card.cat-direct,
.tc-source-card.cat-referral{ border-left: 3px solid rgba(120,255,170,0.50); }
.tc-source-card.is-instagram{
    border-color: rgba(225,48,108,0.55);
    background: linear-gradient(160deg, rgba(225,48,108,0.16), rgba(0,0,0,0.18));
}

.tc-chart-tooltip{
    position: absolute;
    z-index: 40;
    pointer-events: none;
    background: rgba(0,0,0,0.86);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    padding: 8px 10px;
    color: rgba(255,255,255,0.95);
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    max-width: 280px;
}
.tc-chart-tooltip strong{ color: #fff; }
.tc-chart-tooltip .tc-muted{ color: rgba(255,255,255,0.72); }

.tc-two-col{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 920px){
    .tc-two-col{ grid-template-columns: 1fr; }
}
.tc-panel{
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.14);
    padding: 10px;
}
.tc-panel-head{
    font-weight: 600;
    margin: 0 0 10px;
}

.tc-sep{
    border: none;
    border-top: 1px solid var(--tc-border-color);
    margin: 18px 0;
}

.tc-filterbar{
    margin: 10px 0 10px;
    border: 1px solid var(--tc-border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.14);
    padding: 10px;
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items:flex-end;
}
.tc-filter label{
    display:block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}
.tc-filter input, .tc-filter select{
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--tc-border-color);
    background: rgba(0,0,0,0.30);
    color: #fff;
    min-width: 120px;
}
.tc-filter-actions{
    display:flex;
    gap: 8px;
    align-items:flex-end;
}

/* tabulky */
.tc-table-zebra tbody tr:nth-child(odd){
    background: rgba(255,255,255,0.02);
}
.tc-ellipsis{
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-code{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

/* pagination */
.tc-pagination{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.tc-pagination-links{
    display:flex;
    align-items:center;
    gap: 10px;
}
.btn.is-disabled{
    pointer-events:none;
    opacity: 0.4;
}

/* mini button */
.btn.btn-mini{
    padding: 6px 9px;
    font-size: 12px;
    border-radius: 10px;
}

/* modal */
.tc-modal[hidden]{ display:none; }
.tc-modal{
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.tc-modal-backdrop{
    position:absolute;
    inset:0;
    background: rgba(0,0,0,0.65);
}
.tc-modal-card{
    position: relative;
    max-width: 860px;
    margin: max(7vh, calc(env(safe-area-inset-top) + 12px)) auto 7vh auto;
    background: rgba(0,0,0,0.92);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.tc-modal-head{
    display:flex;
    justify-content: space-between;
    align-items:center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.tc-modal-title{
    font-weight: 800;
}
.tc-modal-body{
    padding: 12px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 70vh;
    overflow:auto;
    font-size: 13px;
    color: #eee;
}
body.tc-modal-open{ overflow: hidden; }

@media (max-width: 900px){
    .tc-ellipsis{ max-width: 160px; }
}


/* === Capacitor app mode: bottom tab bar (zobrazí se jen v Capacitor WebView) === */
body.tc-app-mode {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
#tc-bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: #000;
  border-top: 1px solid rgba(255, 220, 0, 0.3);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) 4px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.6);
}
#tc-bottom-tabs .tc-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  text-decoration: none;
  color: #aaa;
  font-size: 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  min-height: 50px;
}
#tc-bottom-tabs .tc-tab:hover,
#tc-bottom-tabs .tc-tab:active {
  background: rgba(255, 220, 0, 0.1);
}
#tc-bottom-tabs .tc-tab-active {
  color: #fbd400;
}
#tc-bottom-tabs .tc-tab-icon {
  font-size: 22px;
  line-height: 1;
}
#tc-bottom-tabs .tc-tab-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Při psaní (klávesnice venku) schovat spodní app lištu — fix vyskakování na starších Androidech */
body.tc-typing #tc-bottom-tabs { display: none !important; }
body.tc-app-mode.tc-typing { padding-bottom: 0 !important; }
