/* ============================================================
   Retriever Show Platform – Admin panel stíluslap
   Oldalsáv: 240px, sötét (#1e293b)
   ============================================================ */

:root {
    --sidebar-width:   240px;
    --sidebar-bg:      #1e293b;
    --sidebar-hover:   #334155;
    --sidebar-active:  #2f855a;
    --topbar-height:   64px;
    --topbar-bg:       #1e293b;
}

/* ============================================================
   ADMIN ELRENDEZÉS
   ============================================================ */
.admin-body {
    background: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Oldalsáv */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Oldalsáv fejléc */
.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-logo:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar-logo .logo-icon { font-size: 1.4rem; }

/* Navigáció */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: white;
}

.sidebar-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }

.text-danger-light { color: #f87171 !important; }
.text-danger-light:hover { background: rgba(248,113,113,.1) !important; }

/* Oldalsáv lába */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

/* ============================================================
   ADMIN FŐ TARTALOM
   ============================================================ */
.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   FELSŐ SÁV
   ============================================================ */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--topbar-bg);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2f855a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-user-details {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.admin-user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Hamburger oldalsáv váltóhoz */
.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.2s;
}

/* ============================================================
   ADMIN TARTALOM TERÜLET
   ============================================================ */
.admin-content {
    flex: 1;
    padding: 24px;
}

/* ============================================================
   STATISZTIKA KÁRTYÁK (ADMIN)
   ============================================================ */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.admin-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

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

.stat-blue   { background: #dbeafe; }
.stat-green  { background: #dcfce7; }
.stat-orange { background: #ffedd5; }
.stat-red    { background: #fee2e2; }
.stat-purple { background: #f3e8ff; }

.admin-stat-info {}
.admin-stat-value { font-size: 1.8rem; font-weight: 800; color: #1e293b; line-height: 1; }
.admin-stat-label { font-size: 0.8rem; color: #64748b; margin-top: 4px; font-weight: 500; }

/* ============================================================
   ADMIN TÁBLÁZATOK
   ============================================================ */
.admin-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
}

.admin-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.admin-table-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    background: #f8fafc;
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.admin-table th:hover { background: #f1f5f9; }
.admin-table th .sort-icon { margin-left: 4px; opacity: 0.4; }
.admin-table th.sorted-asc  .sort-asc,
.admin-table th.sorted-desc .sort-desc { opacity: 1; }

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8fafc; }

/* Akció gombok */
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

/* ============================================================
   ADMIN FORM KÁRTYA
   ============================================================ */
.admin-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
}

.admin-form-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.admin-form-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.admin-form-body {
    padding: 24px;
}

/* ============================================================
   GYORS LINKEK
   ============================================================ */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.quick-link-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-link-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-2px);
    border-color: #2f855a;
    color: inherit;
}

.quick-link-icon { font-size: 2rem; margin-bottom: 8px; }
.quick-link-label { font-size: 0.875rem; font-weight: 600; color: #475569; }

/* ============================================================
   TEVÉKENYSÉG LOG
   ============================================================ */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: #f8fafc; }

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: #f0fff4;
}

.activity-content { flex: 1; }
.activity-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.activity-desc  { font-size: 0.8rem;  color: #64748b; margin-top: 2px; }
.activity-time  { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; }

/* ============================================================
   ADMIN BEJELENTKEZÉSI OLDAL
   ============================================================ */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.admin-login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-logo-icon { font-size: 3rem; }
.admin-login-logo h1   { font-size: 1.4rem; font-weight: 800; color: #1e293b; margin-top: 8px; }
.admin-login-logo p    { font-size: 0.85rem; color: #64748b; }

/* ============================================================
   OLDALAK SZŰRŐ SÁVJA
   ============================================================ */
.admin-filter-bar {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   EREDMÉNY RÖGZÍTÉS
   ============================================================ */
.result-entry-table {
    width: 100%;
    border-collapse: collapse;
}

.result-entry-table th {
    background: #f8fafc;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.result-entry-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.result-entry-table input,
.result-entry-table select {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.result-entry-table input:focus,
.result-entry-table select:focus {
    outline: none;
    border-color: #2f855a;
}

/* ============================================================
   BTN KIEGÉSZÍTÉSEK
   ============================================================ */
.btn-outline-light {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,.1);
    color: white;
    border-color: #94a3b8;
}

/* ============================================================
   RESZPONZÍV ADMIN
   ============================================================ */
@media (max-width: 1200px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar-toggle { display: flex; }

    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.3);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-user-details { display: none; }
}

@media (max-width: 600px) {
    .admin-stats-grid { grid-template-columns: 1fr; }
    .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 0 16px; }
    .admin-table-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .admin-filter-bar { flex-direction: column; }
}

@media (max-width: 400px) {
    .quick-links-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TAGDÍJ OLDAL – ADMIN
   ============================================================ */
.tagdij-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tagdij-user-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.tagdij-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.tagdij-user-email {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 12px;
}

/* Nyomtatási nézet */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .action-buttons,
    .btn { display: none !important; }

    .admin-main { margin-left: 0; }

    .admin-table-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
