/* ============================================================================
   AlionOS admin felület: közös stílusok (globális, minden /admin oldal használja).
   Az sp-* osztályok a korábbi egyoldalas admin (Csomagok, Felhasználók, Napló)
   építőelemei, az adm-* osztályok az új modulok (Kommunikáció, irányítópult) elemei.
   Színvilág: navy fő szín, világosszürke/fehér felületek, zöld/piros akcentus.
   ============================================================================ */

.sp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.sp-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.sp-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.sp-title i {
    color: #1e3a8a;
    font-size: 1.6rem;
}

.sp-subtitle {
    color: #5d6b7c;
    margin: 0;
    font-size: 0.95rem;
}

.sp-no-access {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
}

.sp-no-access i {
    font-size: 2.5rem;
}

.sp-loading {
    display: flex;
    justify-content: center;
    padding: 64px;
}

.sp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px;
    color: #64748b;
}

.sp-empty i {
    font-size: 2.5rem;
}

/* Kártyák (csomagok) */
.sp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
}

.sp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 8px 16px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
}

.sp-card-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-card-icon {
    font-size: 1.6rem;
    color: #cbd5f5;
}

.sp-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.sp-card-code {
    font-size: 0.8rem;
    color: #cbd5f5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sp-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sp-badge-active {
    background: #dcfce7;
    color: #166534;
}

.sp-badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.sp-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.sp-section-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    font-style: italic;
}

.sp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.sp-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-form-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
}

.sp-input {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.sp-form-field-toggle {
    justify-content: flex-end;
}

.sp-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #0f172a;
    padding: 6px 0;
}

.sp-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1e3a8a;
    cursor: pointer;
}

.sp-form-field-highlight label {
    color: #1e3a8a;
    font-weight: 700;
}

.sp-form-field-highlight input {
    border-color: #1e3a8a;
    background: #eff6ff;
}

.sp-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.sp-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #0f172a;
    transition: background 0.15s;
}

.sp-feature:hover {
    background: #f1f5f9;
}

.sp-feature input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #16a34a;
    cursor: pointer;
}

.sp-card-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}

.sp-btn-primary {
    background: #1e3a8a;
    color: #ffffff;
}

.sp-btn-primary:hover:not(:disabled) {
    background: #1e40af;
}

.sp-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.sp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Fülek ===== */
.sp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
}

.sp-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.sp-tab:hover {
    background: #f1f5f9;
    color: #1e3a8a;
}

.sp-tab-active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a;
    background: #f8fafc;
    font-weight: 600;
}

.sp-tab i {
    font-size: 1.05rem;
}

.sp-tab-badge {
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ===== Belépett felhasználók összesítő ===== */
.sp-au-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.sp-au-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    min-width: 260px;
}

.sp-au-summary-card i {
    font-size: 2rem;
    color: #cbd5f5;
}

.sp-au-summary-card > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-au-summary-label {
    font-size: 0.8rem;
    color: #cbd5f5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sp-au-summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.sp-btn-secondary {
    background: #ffffff;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
}

.sp-btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #1e3a8a;
}

/* ===== Belépett felhasználók táblázat ===== */
.sp-au-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.sp-au-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sp-au-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.sp-au-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #1e3a8a;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.sp-au-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.sp-au-table tbody tr:hover {
    background: #f8fafc;
}

.sp-au-table tbody td {
    padding: 12px 16px;
    color: #0f172a;
    vertical-align: middle;
}

.sp-au-name {
    font-weight: 600;
    color: #0f172a;
}

.sp-au-username {
    margin-left: 6px;
    color: #64748b;
    font-size: 0.82rem;
}

.sp-au-empty {
    color: #5d6b7c;
    font-style: italic;
}

/* ===== Megszemélyesítés fül ===== */

.sp-imp-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.sp-imp-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a8a;
    font-size: 0.88rem;
}

.sp-imp-info i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sp-imp-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-imp-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.sp-imp-search > i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.sp-imp-search-input {
    padding-left: 36px !important;
    width: 100%;
}

.sp-btn-impersonate {
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.82rem;
    padding: 6px 14px;
}

.sp-btn-impersonate:hover:not(:disabled) {
    background: #1e40af;
}

.sp-btn-impersonate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sp-imp-row-self {
    background: #f8fafc;
}

.sp-imp-self-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    font-style: italic;
}

/* Email megerősítés állapot jelzők */

.sp-email-confirmed {
    color: #16a34a;
    font-size: 1.2rem;
}

.sp-email-not-confirmed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d97706;
    font-size: 1.1rem;
}

.sp-btn-resend-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e3a8a;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.sp-btn-resend-email:hover {
    background: #dbeafe;
    border-color: #1e3a8a;
}

/* ===== Force Logout gomb ===== */

.sp-btn-force-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sp-btn-force-logout:hover {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

/* ===== Audit log szűrő sor ===== */

.sp-audit-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.sp-audit-filter-row .sp-form-field {
    min-width: 160px;
}

.sp-audit-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 2px;
}

/* Audit log akció badge */

.sp-audit-action-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Audit log IP cím */

.sp-audit-ip {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    color: #64748b;
}

/* ===== Szűrő chipek ===== */

.sp-imp-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-chip-group {
    display: flex;
    gap: 6px;
}

.sp-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sp-chip:hover {
    background: #f1f5f9;
    border-color: #1e3a8a;
    color: #1e3a8a;
}

.sp-chip-active {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

.sp-chip-active:hover {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

/* ===== Rendezhető oszlopfejléc ===== */

.sp-sort-header {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sp-sort-header:hover {
    color: #1e40af;
}

.sp-sort-header i {
    font-size: 0.85rem;
}

/* ============================================================================
   adm-*: az új admin modulok közös építőelemei
   ============================================================================ */

/* ----- Oldal ----- */
.adm-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 4px 32px 4px;
}

.adm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
}

.adm-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.adm-page-title i {
    color: #1e3a8a;
}

.adm-page-subtitle {
    color: #5d6b7c;
    margin: 0;
    font-size: 0.92rem;
    max-width: 780px;
}

.adm-page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.adm-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1e3a8a;
    font-size: 0.85rem;
    margin-bottom: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.adm-back:hover {
    text-decoration: underline;
}

/* ----- Kártyák ----- */
.adm-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04);
    margin-bottom: 18px;
}

.adm-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.adm-card-title i {
    color: #1e3a8a;
    margin-right: 6px;
}

.adm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.adm-card-grid > .adm-card {
    margin-bottom: 0;
}

/* ----- KPI csempék ----- */
.adm-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.adm-kpi {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1e3a8a;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.adm-kpi-positive {
    border-left-color: #16a34a;
}

.adm-kpi-negative {
    border-left-color: #dc2626;
}

.adm-kpi-muted {
    border-left-color: #94a3b8;
}

.adm-kpi-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 4px;
}

.adm-kpi-value {
    display: block;
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.adm-kpi-sub {
    display: block;
    font-size: 0.8rem;
    color: #5d6b7c;
    margin-top: 2px;
}

/* ----- Modul-csempék (irányítópult) ----- */
.adm-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.adm-tile {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.adm-tile:hover {
    border-color: #1e3a8a;
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.12);
}

.adm-tile-icon {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 9px;
    background: #eef2ff;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.adm-tile-title {
    display: block;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.93rem;
}

.adm-tile-desc {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.adm-tiles-group {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 18px 0 8px 0;
}

/* ----- Eszköztár, keresés, csoportos műveletek ----- */
.adm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.adm-toolbar-spacer {
    flex: 1 1 auto;
}

.adm-search {
    position: relative;
    flex: 0 1 320px;
}

.adm-search > i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.adm-search input {
    padding-left: 32px;
    width: 100%;
}

.adm-bulkbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #14213d;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.adm-bulkbar-count {
    font-weight: 600;
    margin-right: 6px;
}

.adm-bulkbar .adm-select {
    width: auto;
    min-width: 200px;
}

/* ----- Táblázat ----- */
.adm-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.adm-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.adm-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1f2937;
    vertical-align: middle;
}

.adm-table tbody tr:hover {
    background: #f8fafc;
}

.adm-table tbody tr.adm-row-selected {
    background: #eef2ff;
}

.adm-table .adm-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.adm-col-check {
    width: 36px;
}

.adm-table-muted {
    color: #64748b;
    font-size: 0.8rem;
}

.adm-link {
    background: none;
    border: none;
    padding: 0;
    color: #1e3a8a;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.adm-link:hover {
    text-decoration: underline;
}

.adm-row-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.adm-icon-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.adm-icon-btn:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
}

.adm-icon-btn-danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.adm-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.adm-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 4px;
    font-size: 0.85rem;
    color: #475569;
}

/* ----- Állapot-címkék ----- */
.adm-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.adm-status-draft {
    background: #f1f5f9;
    color: #475569;
}

.adm-status-scheduled {
    background: #e0e7ff;
    color: #3730a3;
}

.adm-status-sending {
    background: #dbeafe;
    color: #1d4ed8;
}

.adm-status-paused {
    background: #fef3c7;
    color: #92400e;
}

.adm-status-completed {
    background: #dcfce7;
    color: #166534;
}

.adm-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.adm-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    margin-right: 4px;
}

.adm-tag-user {
    background: #e0e7ff;
    color: #3730a3;
}

.adm-tag-contact {
    background: #fef3c7;
    color: #92400e;
}

.adm-tag-danger {
    background: #fee2e2;
    color: #991b1b;
}

.adm-tag-success {
    background: #dcfce7;
    color: #166534;
}

/* ----- Űrlap ----- */
.adm-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 18px;
}

.adm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.adm-field-wide {
    grid-column: 1 / -1;
}

.adm-field > label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.adm-field-required > label::after {
    content: " *";
    color: #dc2626;
}

.adm-input,
.adm-select,
.adm-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #0f172a;
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.adm-input-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

.adm-field-error {
    font-size: 0.78rem;
    color: #b91c1c;
}

.adm-hint {
    font-size: 0.78rem;
    color: #64748b;
}

/* Kampány küldési üteme: a becslés sima érték, nem beviteli mező */
.adm-static-value {
    display: flex;
    align-items: center;
    min-height: 38px;
    font-weight: 600;
    color: #1e3a8a;
}

/* Riport oldal: óránkénti korlát egy sorban */
.adm-pace-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.adm-pace-label,
.adm-pace-unit {
    font-size: 0.86rem;
    color: #334155;
}

.adm-pace-input {
    width: 130px;
}

.adm-textarea {
    min-height: 90px;
    resize: vertical;
}

.adm-code {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 0.83rem;
    min-height: 460px;
    line-height: 1.45;
}

.adm-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.adm-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 0.83rem;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
}

.adm-check-on {
    border-color: #1e3a8a;
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 600;
}

.adm-check input {
    margin: 0;
}

.adm-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
}

.adm-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e3a8a;
    font-weight: 700;
    margin: 18px 0 10px 0;
}

.adm-section-title:first-child {
    margin-top: 0;
}

/* ----- Üzenetdobozok ----- */
.adm-info-box,
.adm-warning-box,
.adm-error-box,
.adm-success-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.87rem;
    margin-bottom: 14px;
}

.adm-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.adm-warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.adm-error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.adm-success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.adm-issues {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adm-issue {
    display: flex;
    gap: 8px;
    font-size: 0.84rem;
    padding: 7px 10px;
    border-radius: 6px;
}

.adm-issue-error {
    background: #fef2f2;
    color: #991b1b;
}

.adm-issue-warning {
    background: #fffbeb;
    color: #92400e;
}

/* ----- Gombváltozatok ----- */
.adm-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: none;
}

.adm-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.adm-btn-success {
    background: #16a34a;
    color: #ffffff;
    border: none;
}

.adm-btn-success:hover:not(:disabled) {
    background: #15803d;
}

.adm-btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* ----- Sablonszerkesztő ----- */
.adm-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.adm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.adm-chip {
    border: 1px dashed #94a3b8;
    background: #f8fafc;
    color: #334155;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: Consolas, monospace;
    font-size: 0.76rem;
    cursor: pointer;
}

.adm-chip:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
}

.adm-preview-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.adm-preview-subject {
    font-size: 0.88rem;
    color: #0f172a;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.adm-preview-stage {
    background: #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: center;
}

.adm-preview-frame {
    width: 100%;
    height: 680px;
    border: none;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.adm-preview-mobile .adm-preview-frame {
    width: 390px;
    max-width: 100%;
}

/* A levelezőprogramok kényszerített sötét módjának közelítése */
.adm-preview-dark .adm-preview-frame {
    filter: invert(0.92) hue-rotate(180deg);
}

/* ----- Párbeszédablak ----- */
.adm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 2100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px 16px 16px;
    overflow-y: auto;
}

.adm-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.adm-modal-wide {
    max-width: 1000px;
}

.adm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.adm-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.adm-modal-body {
    padding: 18px 20px;
}

.adm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* ----- Lépések (import varázsló) ----- */
.adm-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.adm-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.adm-step-active {
    background: #14213d;
    color: #ffffff;
}

.adm-step-done {
    background: #dcfce7;
    color: #166534;
}

.adm-upload {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 28px;
    text-align: center;
    background: #f8fafc;
    color: #475569;
}

.adm-upload i {
    font-size: 2rem;
    color: #1e3a8a;
    display: block;
    margin-bottom: 8px;
}

/* ----- Kampány-tölcsér ----- */
.adm-funnel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.adm-funnel-step {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.adm-funnel-step-goal {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.adm-funnel-step-bad {
    background: #fef2f2;
    border-color: #fecaca;
}

.adm-funnel-label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
}

.adm-funnel-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.adm-funnel-rate {
    display: block;
    font-size: 0.82rem;
    color: #1e3a8a;
    font-weight: 600;
}

.adm-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.adm-variant {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.adm-variant-winner {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.adm-variant-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

/* ----- Rendszerüzenet előnézet ----- */
.adm-ann-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.adm-ann-info {
    background: #1e3a8a;
    color: #ffffff;
}

.adm-ann-success {
    background: #15803d;
    color: #ffffff;
}

.adm-ann-warning {
    background: #f59e0b;
    color: #1f2937;
}

.adm-ann-preview a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

/* ----- Listák oldalsávval (kapcsolatok) ----- */
.adm-list-sidebar {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.adm-list-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.adm-list-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #1f2937;
    font-size: 0.88rem;
}

.adm-list-nav-item:hover {
    background: #f1f5f9;
}

.adm-list-nav-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1e3a8a;
    font-weight: 600;
}

.adm-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    font-size: 0.88rem;
    margin: 0;
}

.adm-dl dt {
    color: #64748b;
}

.adm-dl dd {
    margin: 0;
    color: #0f172a;
}

@media (max-width: 1000px) {
    .adm-editor,
    .adm-list-sidebar,
    .adm-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.adm-funnel + .adm-funnel {
    margin-top: 10px;
}

/* ----- Szerepkörök és jogok (szerepkör-mátrix) ----- */
.adm-perm-schema {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.adm-perm-kpi-pending {
    color: #1d4ed8;
}

.adm-perm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8rem;
    color: #475569;
}

.adm-perm-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.adm-perm-wrapper {
    max-height: calc(100vh - 300px);
    overflow: auto;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.adm-perm-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    vertical-align: top;
}

.adm-perm-label-col {
    min-width: 260px;
}

.adm-perm-table tbody td.adm-perm-label-col {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 1;
    font-weight: 500;
}

.adm-perm-table thead th.adm-perm-label-col {
    left: 0;
    z-index: 3;
}

.adm-perm-role-col {
    text-align: center !important;
    min-width: 104px;
}

.adm-perm-role-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #14213d;
}

.adm-perm-role-count {
    font-size: 0.72rem;
    font-weight: 400;
    color: #64748b;
    margin-top: 2px;
}

.adm-perm-col-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.adm-perm-col-actions .adm-icon-btn {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
}

.adm-perm-action-col {
    width: 44px;
    text-align: center;
}

.adm-perm-group-row td {
    background: #f8fafc;
    color: #1e3a8a;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 7px 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.adm-perm-table tbody tr.adm-perm-group-row:hover {
    background: transparent;
}

.adm-perm-td {
    text-align: center;
    padding: 5px 8px !important;
}

.adm-perm-cell,
.adm-perm-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    position: relative;
}

.adm-perm-swatch {
    width: 22px;
    height: 20px;
    font-size: 0.75rem;
}

.adm-perm-cell {
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.adm-perm-cell:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
}

.adm-perm-cell:disabled {
    cursor: default;
}

.adm-perm-granted {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.adm-perm-denied {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* A letiltott (zárolt, mentés közbeni) cella is a saját színét tartsa, ne a globális disabled szürkét */
.adm-perm-cell.adm-perm-granted:disabled {
    background: #dcfce7;
    color: #15803d;
}

.adm-perm-cell.adm-perm-denied:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Zárolt (Tulajdonos): megkapja, de nem állítható, ezért halványabb */
.adm-perm-locked {
    opacity: 0.6;
}

/* Eltér az alapmátrixtól: borostyán keret és sarokpont */
.adm-perm-override {
    border: 2px solid #f59e0b;
}

.adm-perm-override::after {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px #ffffff;
}

/* Mentetlen tervezet: kék, szaggatott keret */
.adm-perm-pending {
    border: 2px dashed #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.adm-perm-change-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    overflow-y: auto;
}

.adm-perm-change-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.86rem;
}

.adm-perm-change-grant {
    color: #15803d;
    font-weight: 600;
}

.adm-perm-change-revoke {
    color: #b91c1c;
    font-weight: 600;
}
