/* Signage Cloud Admin — Bootstrap 5 Dark Sidebar */

:root {
    --sidebar-width: 260px;
    --topbar-height: 56px;
    --sidebar-bg: #1a1d23;
    --sidebar-hover: #2a2d35;
    --sidebar-active: #0d6efd;
    --topbar-bg: #212529;
    --content-bg: #f5f6fa;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #adb5bd;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: width 0.2s;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--sidebar-active);
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.sidebar-item {
    margin: 2px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #adb5bd;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: var(--topbar-height);
    background: var(--topbar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-title {
    font-weight: 500;
}

.topbar-tenant {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.admin-content {
    flex: 1;
    background: var(--content-bg);
    padding: 24px;
}

/* Dashboard cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 20px 24px;
}

.stat-icon {
    font-size: 2rem;
}

/* Table improvements */
.table-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.table-card .card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

/* Horizontální scroll tabulek na úzkých obrazovkách */
.table-card .card-body {
    overflow-x: auto;
}

/* Dlouhé názvy/hash — zalomí se, aby nevytlačily tlačítka */
.table-card .table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1d23 0%, #2d3748 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin: 16px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Status badges */
.status-online { background: #198754; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; }
.status-offline { background: #dc3545; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; }
.status-warning { background: #ffc107; color: #000; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; }

/* Fialová badge pro TEXT položky (Bootstrap nemá bg-purple) */
.bg-purple { background-color: #6f42c1 !important; color: #fff !important; }

/* Drop zone */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--sidebar-active);
    background: rgba(13, 110, 253, 0.05);
}

/* Playlist item drag */
.playlist-item {
    cursor: grab;
    transition: background 0.15s;
}

.playlist-item:hover {
    background: #f8f9fa;
}

.playlist-item:active {
    cursor: grabbing;
}

/* ===== Faktura ===== */
.invoice-document {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 32px;
    max-width: 960px;
    margin: 0 auto;
}

/* ===== Responzivní chování ===== */
.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 992px) {
    .sidebar-toggle { display: inline-flex; }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 30px rgba(0,0,0,0.5);
    }

    .admin-main { margin-left: 0; }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .sidebar-overlay.show { display: block; }

    .admin-content { padding: 16px; }
    .admin-topbar { padding: 0 16px; }
}
