/* ============================================================
   jt-online Admin-Stylesheet
   ============================================================ */

:root {
    --admin-sidebar-width: 240px;
    --admin-sidebar-bg:    #1a2233;
    --admin-sidebar-hover: rgba(255,255,255,0.08);
    --admin-sidebar-active:#2297C6;
    --admin-header-h:      56px;
}

body.admin-body {
    background: #f0f2f5;
    font-family: 'Inter', system-ui, sans-serif;
}

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

/* Sidebar */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    color: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.admin-sidebar-logo {
    padding: 1.2rem 1.2rem 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-logo .brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.admin-sidebar-logo .sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 0.85rem 1.2rem 0.35rem;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.2rem;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-sidebar-nav a:hover {
    background: var(--admin-sidebar-hover);
    color: #fff;
}

.admin-sidebar-nav a.active {
    background: var(--admin-sidebar-hover);
    color: #fff;
    border-left-color: var(--admin-sidebar-active);
}

.admin-sidebar-nav a .icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.75;
}

.admin-sidebar-nav a.active .icon,
.admin-sidebar-nav a:hover .icon {
    opacity: 1;
}

.admin-sidebar-footer {
    padding: 0.85rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.83rem;
    text-decoration: none;
    transition: color 0.15s;
}

.admin-sidebar-footer a:hover {
    color: rgba(255,255,255,0.9);
}

/* Hauptbereich */
.admin-main {
    margin-left: var(--admin-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    height: var(--admin-header-h);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2233;
    margin: 0;
}

.admin-content {
    flex: 1;
    padding: 1.75rem 1.5rem;
}

/* ------------------------------------------------------------
   Karten
   ------------------------------------------------------------ */
.admin-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f2f5;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2233;
    margin: 0;
}

/* ------------------------------------------------------------
   Tabellen
   ------------------------------------------------------------ */
.admin-table {
    width: 100%;
    font-size: 0.875rem;
}

.admin-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
    padding: 0.7rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

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

/* ------------------------------------------------------------
   Formulare
   ------------------------------------------------------------ */
.admin-form label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 4px;
}

.admin-form .form-control,
.admin-form .form-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: #2297C6;
    box-shadow: 0 0 0 3px rgba(34, 151, 198, 0.15);
}

.admin-form .form-text {
    font-size: 0.78rem;
    color: #6b7280;
}

/* ------------------------------------------------------------
   Buttons (Admin)
   ------------------------------------------------------------ */
.btn-admin-primary {
    background: #1C518B;
    border-color: #1C518B;
    color: #fff;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
}

.btn-admin-primary:hover {
    background: #163f6d;
    border-color: #163f6d;
    color: #fff;
}

.btn-admin-secondary {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
}

.btn-admin-secondary:hover {
    background: #e2e8f0;
    color: #1a2233;
}

.btn-sm-icon {
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    border-radius: 5px;
    line-height: 1.3;
}

/* ------------------------------------------------------------
   Dashboard Stats
   ------------------------------------------------------------ */
.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.blue      { background: rgba(28, 81, 139, 0.1);  color: #1C518B; }
.stat-icon.lightblue { background: rgba(34, 151, 198, 0.1); color: #2297C6; }
.stat-icon.turquoise { background: rgba(38, 216, 195, 0.1); color: #26D8C3; }
.stat-icon.orange    { background: rgba(240, 165, 0, 0.1);  color: #f0a500; }

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a2233;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

/* ------------------------------------------------------------
   Chat-Moderation
   ------------------------------------------------------------ */
.chat-mod-message {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.chat-mod-message.status-deleted {
    opacity: 0.5;
    border-left-color: #ef4444;
}

.chat-mod-message.status-highlighted {
    background: rgba(38, 216, 195, 0.07);
    border-left-color: #26D8C3;
}

.chat-mod-message.is-speaker {
    border-left-color: #1C518B;
}

.chat-mod-body { flex: 1; font-size: 0.875rem; }

.chat-mod-meta {
    font-size: 0.76rem;
    color: #9ca3af;
    margin-bottom: 3px;
}

.chat-mod-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   Foto-Vorschau
   ------------------------------------------------------------ */
.upload-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 0.5rem;
}

.upload-preview-logo {
    max-height: 60px;
    max-width: 160px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    margin-top: 0.5rem;
    background: #f8fafc;
}

/* ------------------------------------------------------------
   Responsive (Sidebar collapse auf kleinen Bildschirmen)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
}
