* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: "Source Sans Pro", "Nunito Sans", Helvetica, Arial, Lucida, sans-serif;
    background: #f4f5f7;
    color: #2a2a2a;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* --- layout --- */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #1f2430;
    color: #d7dae0;
    transition: margin-left .2s ease;
}

.admin-sidebar.collapsed {
    margin-left: -250px;
}

.admin-sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid #2c3242;
}

.admin-logo {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #d7dae0;
    font-size: 0.95rem;
}

.admin-nav a:hover {
    background: #2a3040;
}

.admin-nav a.active {
    background: #333b52;
    color: #fff;
    border-left: 3px solid #6c8cff;
}

.admin-nav a .material-icons {
    font-size: 20px;
}

.admin-nav-sub {
    padding-left: 34px !important;
}

.admin-nav-group-label {
    padding: 14px 20px 4px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7c8296;
}

.admin-sidebar-overlay {
    display: none;
}

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

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #e4e6eb;
}

.admin-sidebar-toggle {
    cursor: pointer;
    color: #444;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 0.95rem;
}

.admin-content {
    padding: 24px;
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        margin-left: -250px;
    }

    .admin-sidebar.open {
        margin-left: 0;
        box-shadow: 2px 0 12px rgba(0,0,0,0.25);
    }

    .admin-sidebar.collapsed {
        margin-left: -250px;
    }

    .admin-sidebar-overlay.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
}

/* --- shared UI --- */

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2f3b52;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-btn:hover {
    background: #3d4c6b;
}

.admin-btn-danger {
    background: #c94040;
}

.admin-btn-danger:hover {
    background: #a83333;
}

.admin-btn-secondary {
    background: #e4e6eb;
    color: #333;
}

.admin-btn-secondary:hover {
    background: #d6d9e0;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f1f4;
    border-radius: 6px;
    padding: 8px 12px;
    max-width: 320px;
}

.admin-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
}

.admin-table th {
    color: #777;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table tr:hover td {
    background: #fafafc;
}

.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
}

.admin-badge-active {
    background: #e3f6e8;
    color: #268a4e;
}

.admin-badge-inactive {
    background: #f2f2f2;
    color: #888;
}

.admin-table-actions {
    white-space: nowrap;
}

.admin-table-actions a,
.admin-table-actions .admin-icon-btn {
    margin-right: 16px;
}

.admin-table-actions a:last-child,
.admin-table-actions .admin-icon-btn:last-child {
    margin-right: 0;
}

.admin-icon-btn {
    cursor: pointer;
    color: #777;
    font-size: 20px;
    vertical-align: middle;
}

.admin-icon-btn:hover {
    color: #222;
}

.admin-form-row {
    margin-bottom: 16px;
}

.admin-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: #555;
}

.admin-form-row input[type=text],
.admin-form-row input[type=password],
.admin-form-row input[type=date],
.admin-form-row input[type=email],
.admin-form-row input[type=tel],
.admin-form-row input[type=number],
.admin-form-row select,
.admin-form-row textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px 14px;
    border: 1.5px solid #e0e2e7;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: #2a2a2a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form-row textarea {
    max-width: 100%;
    resize: vertical;
    line-height: 1.5;
}

.admin-form-row input[type=text]:hover,
.admin-form-row input[type=password]:hover,
.admin-form-row input[type=date]:hover,
.admin-form-row input[type=email]:hover,
.admin-form-row input[type=tel]:hover,
.admin-form-row input[type=number]:hover,
.admin-form-row select:hover,
.admin-form-row textarea:hover {
    border-color: #c5c8d0;
}

.admin-form-row input[type=text]:focus,
.admin-form-row input[type=password]:focus,
.admin-form-row input[type=date]:focus,
.admin-form-row input[type=email]:focus,
.admin-form-row input[type=tel]:focus,
.admin-form-row input[type=number]:focus,
.admin-form-row select:focus,
.admin-form-row textarea:focus {
    outline: none;
    border-color: #6b8cff;
    box-shadow: 0 0 0 3px rgba(107,140,255,0.15);
}

.admin-form-row input::placeholder,
.admin-form-row textarea::placeholder {
    color: #a8abb3;
}

.admin-form-row select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.admin-form-row-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 20px;
}

/* Formular zakladnich udaju galerie (nazev/misto/datum/...) - policka pod sebou
   misto vedle sebe */
.admin-form-grid.admin-form-grid-stacked {
    grid-template-columns: 1fr;
}

.admin-section-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-section-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eef0f4;
    border-radius: 20px;
    padding: 6px 8px 6px 14px;
    font-size: 0.88rem;
}

.admin-section-chip .material-icons {
    font-size: 16px;
    cursor: pointer;
}

.admin-section-name-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d7d9de;
    border-radius: 6px;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

/* jedna "linka" objednavky (jeden zvoleny produkt vc. vsech jeho fotek - napr.
   cela fotokniha pohromade pod jednou cenou) */
.admin-order-line {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.admin-order-line:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}

.admin-order-line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1.02rem;
}

.admin-photo-card {
    background: #fafafc;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.admin-photo-card.selected {
    border-color: #6c8cff;
    background: #eef1ff;
}

.admin-photo-card-img-wrap {
    position: relative;
}

.admin-photo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.admin-photo-select-check {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.6);
    font-size: 22px;
    display: none;
}

.admin-photo-card.selected .admin-photo-select-check {
    display: block;
    color: #6c8cff;
    text-shadow: 0 0 3px rgba(255,255,255,0.9);
}

.admin-photo-cover-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(38,138,78,0.9);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.admin-photo-card-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-photo-section-label {
    color: #555;
    text-align: center;
    font-size: 0.8rem;
}

.admin-photo-card-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-photo-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-photo-card-fileid {
    color: #999;
    font-size: 0.8rem;
}

.admin-photo-card-icons {
    display: flex;
    gap: 4px;
}

.admin-photo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

/* Neviditelny "pruh" pres sirku obsahove plochy (bez postranniho panelu - viz
   admin_photo_toolbar_position() v admin.js), ve kterem se sama vystredi
   plovouci lista s vyberem nize. pointer-events:none, aby pres prazdnou cast
   pruhu slo normalne klikat na fotky pod nim. */
.admin-photo-toolbar-select-wrap {
    position: fixed;
    bottom: 24px;
    z-index: 900;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* Stejny princip jako plovouci lista s vyberem fotek ve verejne galerii
   (.choosing_footer) - sklenena bublina pripevnena dole, po vyberu po ruce
   at je stranka scrollovana kamkoli */
.admin-photo-toolbar-select {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    pointer-events: auto;
    background-color: rgba(255,255,255,0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.admin-photo-toolbar-select select {
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #d7d9de;
}

.admin-bulk-assign {
    position: relative;
}

/* Otevira se NAHORU (ne dolu jako drive) - tlacitko je ted v listě dole u
   spodniho okraje obrazovky, dolu by se popover uz nevesel */
.admin-bulk-assign-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    top: auto;
    left: 0;
    background: #fff;
    border: 1px solid #d7d9de;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    padding: 14px 16px;
    z-index: 20;
}

.admin-bulk-assign-list-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

/* Vlastni seznam sekci misto nativniho <select> - jeho rozbalovaci nabidku
   nejde spolehlive donutit otevirat se nahoru, kdyz je select blizko spodniho
   okraje obrazovky (coz tady je, viz plovouci lista). Vlastni seznam zije
   uvnitr .admin-bulk-assign-popover, ktery uz nahoru otevirame sami. */
.admin-bulk-assign-list {
    min-width: 260px;
    max-height: 260px;
    overflow-y: auto;
}

.admin-bulk-assign-list-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.admin-bulk-assign-list-item:hover {
    background: #eef1ff;
}

.admin-photo-toolbar-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
    margin-left: auto;
}

.admin-photo-toolbar-filter select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d7d9de;
}

.admin-reorder-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 10px;
    color: #664d03;
    font-size: 0.92rem;
}

.admin-photo-card[draggable="true"] {
    cursor: grab;
    position: relative;
}

.admin-photo-card.dragging {
    opacity: 0.4;
}

.admin-photo-card.drag-over-before::before,
.admin-photo-card.drag-over-after::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #268a4e;
    z-index: 5;
    /* karta ma overflow:hidden (kvuli zaoblenym rohum nahledu), takze carka musi
       byt uvnitr hranic karty, ne v mezere mezi kartami (tam by se orizla) */
}

.admin-photo-card.drag-over-before::before {
    left: 0;
}

.admin-photo-card.drag-over-after::after {
    right: 0;
}

.admin-photo-hint {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 10px;
}

.admin-photo-card.filtered-out {
    display: none;
}

.admin-empty-state {
    color: #888;
    padding: 30px 0;
    text-align: center;
}

.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2430;
}

.admin-login-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.admin-login-box h1 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.admin-login-error {
    background: #fdeaea;
    color: #b3261e;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.admin-login-box button {
    width: 100%;
    margin-top: 8px;
}

.admin-upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #777;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.admin-upload-dropzone .material-icons {
    font-size: 36px;
    color: #999;
    margin-bottom: 6px;
}

.admin-upload-dropzone.dragover {
    background: #eef1ff;
    border-color: #6c8cff;
    color: #444;
}

.admin-upload-staging {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.admin-upload-staging-item {
    position: relative;
    background: #fafafc;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.admin-upload-staging-item img,
.admin-upload-staging-item .admin-upload-staging-icon {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.admin-upload-staging-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.admin-upload-staging-name {
    font-size: 0.7rem;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-upload-staging-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

@keyframes admin-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn_photo_cover.loading {
    display: inline-block;
    animation: admin-spin 0.8s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

.admin-upload-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* Behem aktivniho nahravani/zpracovani (fronta uloh bezi) se nad celou stranku
   polozi ztmavene prekryvne okno se stavem uprostred - v tu chvili se stejne musi
   pockat a nema smysl umoznovat menit cokoliv jineho na strance */
#upload_progress_wrap.is-blocking {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upload_progress_wrap.is-blocking .admin-upload-status {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    /* Pevna (ne jen minimalni) sirka - u delsiho textu (napr. "5 / 23") se ponechani
       sirky na automatickem dopoctu z obsahu v Safari chovalo nespolehlive a stred
       obsahu (kolecko) se posunul mimo stred okna */
    width: 340px;
    max-width: 90vw;
    box-sizing: border-box;
}

/* Kratce po dokonceni (pred automatickym obnovenim stranky) uz #upload_status_row
   neni videt (viz job_progress_render) a jedinym obsahem modalu je tento box */
#upload_progress_wrap.is-blocking .admin-upload-error {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    min-width: 340px;
    max-width: 90vw;
    margin-top: 0;
}

.admin-upload-spinner {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border: 5px solid #e4e6eb;
    border-top-color: #6c8cff;
    border-radius: 50%;
    animation: admin-spin 0.8s linear infinite;
}

.admin-upload-status-body {
    width: 100%;
    max-width: 340px;
}

.admin-upload-status-body.full-width {
    max-width: none;
}

#upload_progress_text {
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
}

.admin-progress-track {
    background: #eee;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.admin-progress-bar {
    background: #6c8cff;
    height: 100%;
    width: 0%;
    transition: width .3s ease;
}

.admin-upload-cancel-btn {
    margin-top: 14px;
}

.admin-upload-error {
    margin-top: 16px;
}

.admin-upload-error-detail {
    margin-top: 10px;
}

.admin-upload-error-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fdeaea;
    color: #b3261e;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-upload-error-summary.is-success {
    background: #e3f6e8;
    color: #268a4e;
}

.admin-upload-error-summary .material-icons:first-child {
    font-size: 20px;
}

.admin-upload-error-caret {
    margin-left: auto;
    transition: transform .2s ease;
}

.admin-upload-error-caret.open {
    transform: rotate(180deg);
}

.admin-upload-error-log {
    background: #1f2430;
    color: #d7dae0;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
    max-height: 300px;
    overflow: auto;
    font-size: 0.78rem;
    white-space: pre-wrap;
}

/* --- stats.php: klikaci nahled stazene fotografie (overlay/lightbox) --- */

.admin-photo-preview-trigger {
    cursor: pointer;
    color: #999;
}

.admin-photo-preview-trigger:hover {
    color: #3d6fb0;
}

.admin-stats-heading-icon {
    vertical-align: middle;
    margin-right: 8px;
    color: #999;
}

.admin-stats-heading-icon-heart {
    color: #999;
}

.admin-table th.admin-table-col-center,
.admin-table td.admin-table-col-center {
    text-align: center;
}

.admin-table-header-icon {
    vertical-align: middle;
    color: #999;
}

.admin-table-header-icon-heart {
    color: #999;
}

.admin-table th.admin-table-col-icon,
.admin-table td.admin-table-col-icon {
    width: 130px;
    text-align: center;
}

.admin-lightbox-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* bily "ramecek" kolem fotky - stejny prostor na vsech stranach */
.admin-lightbox-card {
    position: relative;
    padding: 15px;
    background-color: #fff;
    box-shadow: 1px 1px 1px #ccc;
    border-radius: 5px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 160px;
}

.admin-lightbox-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-lightbox-spinner {
    display: none;
    width: 44px;
    height: 44px;
    border: 4px solid #e4e6eb;
    border-top-color: #3d6fb0;
    border-radius: 50%;
    animation: admin-spin 0.8s linear infinite;
}

.admin-lightbox-card img {
    display: block;
    max-width: min(85vw, 900px);
    max-height: 65vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* panel s lajky pod fotkou v overlay - stejny pro stazeni/lajky */
.admin-lightbox-social {
    gap: 24px;
    margin-top: 16px;
    width: 100%;
    max-width: min(85vw, 900px);
    border-top: 1px solid #e4e6eb;
    padding-top: 16px;
}

.admin-lightbox-social-col {
    flex: 1;
    min-width: 0;
}

.admin-lightbox-social-col h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #555;
}

.admin-lightbox-social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.admin-lightbox-social-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f1f3;
}

.admin-lightbox-social-list li:last-child {
    border-bottom: none;
}

.admin-lightbox-social-list small {
    color: #999;
    margin-left: 4px;
}

.admin-lightbox-social-list div {
    margin-top: 2px;
    color: #333;
}

.admin-lightbox-social-empty {
    color: #999;
    font-style: italic;
}

@media (max-width: 600px) {
    .admin-lightbox-social {
        flex-direction: column;
    }
}

/* stejny styl jako krizek u fullscreen fotky ve verejne galerii (.close) */
.admin-lightbox-close {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 3rem;
    height: 3rem;
    background: red;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10001;
}

/* Modul Zakazky - zvyrazneni nesplnenych ukolu po terminu */
.admin-badge-overdue {
    background: #fbe1e1;
    color: #c62828;
}

.admin-row-overdue td {
    background: #fdf2f2;
}

.admin-task-row-overdue {
    color: #c62828;
    font-weight: 600;
}

.admin-task-done {
    text-decoration: line-through;
    color: #aaa;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.admin-tab-btn {
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #777;
    border-bottom: 2px solid transparent;
}

.admin-tab-btn.active {
    color: #222;
    border-bottom-color: #222;
    font-weight: 600;
}

.admin-conversation-bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.admin-conversation-me {
    background: #dcefff;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.admin-conversation-client {
    background: #f0f0f0;
    margin-right: auto;
    border-bottom-left-radius: 3px;
}

.admin-conversation-meta {
    font-size: 0.72rem;
    color: #999;
    margin-bottom: 3px;
}

.admin-modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,20,25,0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.admin-modal-backdrop.open {
    display: flex;
}

.admin-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: admin-modal-in 0.15s ease;
}

@keyframes admin-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
