/**
 * ADMIN PANEL CSS — MexcBot Multi-User Support
 * ✅ NOU (16 Mai 2026)
 */

/* ============================================================================
   SVG ICONS — inlocuiesc emoji-urile in UI
   ============================================================================ */

.admin-svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.admin-svg-icon--check {
    width: 15px;
    height: 15px;
    color: currentColor;
    position: relative;
    top: -1px;
}

.admin-svg-icon--restart {
    width: 16px;
    height: 16px;
    color: currentColor;
    position: relative;
    top: -1px;
}

/* Spinner in butonul Restart — loading state */
.admin-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: admin-spin 0.7s linear infinite;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   NAV — buton Admin cu badge notificari
   ============================================================================ */

/* Butonul Admin are position relative pentru a pozitiona badge-ul absolut */
.nav-item--admin .nav-btn {
    position: relative;
}

/* Badge rosu cu numarul de cereri pending */
.admin-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #f85149;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* Icon Admin — definit in svg-icons.css cu pattern ::before, identic cu celelalte iconite */

/* Separator vizual deasupra tab-ului Admin */
.nav-item--admin {
    border-top: 1px solid var(--sidebar-border, #30363d);
    margin-top: 8px;
    padding-top: 8px;
}

/* Ascunde badge-ul cand sidebar-ul este collapsed */
.sidebar.collapsed .admin-badge {
    display: none !important;
}

/* ============================================================================
   ADMIN CONTENT — layout principal
   ============================================================================ */

.admin-content {
    padding: 0 16px 32px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================================================
   NAV PILLS — navigare sub-pagini Admin
   ============================================================================ */

.admin-nav-pills {
    display: flex;
    gap: 6px;
    padding: 0 16px;
    margin: 0 auto 4px;
    max-width: 900px;
    flex-wrap: wrap;
}

.admin-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--admin-border, #30363d);
    background: transparent;
    color: var(--text-muted, #8b949e);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    white-space: nowrap;
}

.admin-pill:hover {
    background: var(--admin-section-bg, #161b22);
    border-color: var(--text-muted, #8b949e);
    color: var(--text-primary, #e6edf3);
}

.admin-pill.active {
    background: var(--header-bg, #1e293b);
    border-color: var(--header-bg, #1e293b);
    color: var(--header-text, #e6edf3);
    font-weight: 600;
}

/* Cursor drag pe pills — indica ca sunt mutabile */
.admin-pill {
    cursor: grab;
}

.admin-pill:active,
.admin-pill--dragging {
    cursor: grabbing;
}

/* Pill care se drageaza — semi-transparent */
.admin-pill--dragging {
    opacity: 0.4;
    cursor: grabbing;
}

/* Pill peste care se trage — indicator drop zone */
.admin-pill--drag-over {
    border-color: var(--login-input-focus, #388bfd);
    box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.25);
    transform: scale(1.05);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Badge pe pill (ex: nr. cereri pending pe pillul Utilizatori) */
.admin-pill-badge {
    display: none;
    background: #f85149;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.admin-pill-badge.visible {
    display: flex;
}

/* Sub-pagini — show/hide */
.admin-subpage {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.admin-subpage.active {
    display: flex;
}

/* ============================================================================
   SECTIUNI
   ============================================================================ */

.admin-section {
    background: var(--admin-section-bg, var(--card-bg, #161b22));
    border: 1px solid var(--admin-border, var(--card-border, #30363d));
    border-radius: 10px;
    overflow: hidden;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border, var(--card-border, #30363d));
    background: var(--admin-section-header-bg, var(--card-header-bg, #1c2128));
}

.admin-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-primary, var(--text-primary, #e6edf3));
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-section-badge {
    background: #f85149;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Badge portocaliu pentru cereri resetare parola */
.admin-section-badge--warning {
    background: #d29922;
}

/* Sectiunea cereri resetare parola */
.admin-section--reset {
    border-color: rgba(210, 153, 34, 0.35);
}

.admin-section--reset .admin-section-header {
    background: rgba(210, 153, 34, 0.08);
    border-bottom-color: rgba(210, 153, 34, 0.2);
}

/* Item cerere resetare parola */
.admin-reset-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(210, 153, 34, 0.06);
    border: 1px solid rgba(210, 153, 34, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    animation: fadeInDown 0.3s ease;
}

.admin-reset-request-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-reset-request-email {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-primary, #e6edf3);
}

.admin-reset-request-time {
    font-size: 11px;
    color: var(--text-muted, #8b949e);
}

.admin-section-body {
    padding: 16px 18px;
}

/* Empty state */
.admin-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted, #8b949e);
    font-size: 13px;
}

/* Loading */
.admin-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-muted, #8b949e);
    font-size: 13px;
}

/* ============================================================================
   CARD USER
   ============================================================================ */

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-card {
    background: var(--admin-user-card-bg, var(--bg-secondary, #0d1117));
    border: 1px solid var(--admin-border, var(--card-border, #30363d));
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.15s;
}
.admin-user-card:hover {
    border-color: var(--admin-accent, var(--accent, #388bfd));
}

.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card-border, #30363d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #e6edf3);
    flex-shrink: 0;
    text-transform: uppercase;
}

.admin-user-avatar--admin { background: rgba(248,81,73,.18); color: #f85149; }
.admin-user-avatar--client { background: rgba(56,139,253,.18); color: #388bfd; }

.admin-user-info {
    flex: 1;
    min-width: 0;
}

.admin-user-email {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-primary, var(--text-primary, #e6edf3));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-meta {
    font-size: 11px;
    color: var(--admin-text-secondary, var(--text-muted, #8b949e));
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-badge--admin  { background: rgba(248,81,73,.15); color: #f85149; border: 1px solid rgba(248,81,73,.3); }
.role-badge--client { background: rgba(56,139,253,.15); color: #388bfd; border: 1px solid rgba(56,139,253,.3); }

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================================
   BUTOANE ACTIUNI
   ============================================================================ */

.admin-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
}
.admin-btn:hover   { opacity: 0.85; }
.admin-btn:active  { transform: scale(0.97); }
.admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.admin-btn--approve { background: rgba(46,160,67,.15); color: #2ea043; border: 1px solid rgba(46,160,67,.3); }
.admin-btn--reject  { background: rgba(248,81,73,.15);  color: #f85149; border: 1px solid rgba(248,81,73,.3); }
.admin-btn--edit      { background: rgba(56,139,253,.15); color: #388bfd; border: 1px solid rgba(56,139,253,.3); }
.admin-btn--reset-pwd { background: rgba(210,153,34,.12); color: #d29922; border: 1px solid rgba(210,153,34,.3); }

/* ============================================================
   BANNER PAROLA TEMPORARA — apare dupa aprobare
   ============================================================ */
.admin-temp-password-banner {
    background: rgba(35, 134, 54, 0.1);
    border: 1px solid rgba(35, 134, 54, 0.4);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.admin-temp-password-title {
    font-size: 13px;
    font-weight: 600;
    color: #2ea043;
    margin-bottom: 6px;
}

.admin-temp-password-email {
    font-size: 13px;
    color: #c9d1d9;
    margin-bottom: 10px;
    font-weight: 500;
}

.admin-temp-password-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
}

.admin-temp-password-value {
    font-family: monospace;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 3px;
    flex: 1;
}

.admin-temp-password-copy {
    background: rgba(35,134,54,0.2);
    border: 1px solid rgba(35,134,54,0.4);
    color: #2ea043;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.admin-temp-password-copy:hover {
    background: rgba(35,134,54,0.35);
}

.admin-temp-password-note {
    font-size: 11px;
    color: #d29922;
}
.admin-btn--save    { background: #238636; color: #fff; }
.admin-btn--cancel  { background: transparent; color: var(--text-muted, #8b949e); border: 1px solid var(--card-border, #30363d); }
.admin-btn--danger  { background: rgba(248,81,73,.15); color: #f85149; border: 1px solid rgba(248,81,73,.3); }

/* ============================================================================
   PANEL EDITARE PERMISIUNI
   ============================================================================ */

.admin-edit-panel {
    margin-top: 12px;
    background: var(--admin-edit-panel-bg, var(--card-header-bg, #1c2128));
    border: 1px solid var(--admin-border, var(--card-border, #30363d));
    border-radius: 8px;
    padding: 16px;
}

.admin-edit-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted, #8b949e);
    letter-spacing: 0;
    margin-bottom: 12px;
}

.admin-edit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Randul Rol — select + label pe aceeasi linie (ordinea: select, label) */
.admin-edit-row--inline {
    flex-wrap: nowrap;
    align-items: center;
}

/* Randul Notes — label + input pe aceeasi linie */
.admin-edit-row--notes {
    align-items: center;
    flex-wrap: nowrap;
}

.admin-notes-input {
    flex: 1;
    background: var(--admin-edit-panel-bg, var(--bg-secondary, #0d1117));
    border: 1px solid var(--admin-border, var(--card-border, #30363d));
    border-radius: 5px;
    color: var(--admin-text-primary, var(--text-primary, #e6edf3));
    font-size: 12px;
    padding: 5px 8px;
    outline: none;
    transition: border-color 0.2s;
}

.admin-notes-input:focus {
    border-color: var(--admin-accent, var(--accent-blue, #388bfd));
}

.admin-notes-input::placeholder {
    color: var(--text-muted, #8b949e);
    font-style: italic;
}

.admin-edit-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #e6edf3);
    width: 60px;
    flex-shrink: 0;
}

/* Label inline (langa select) — fara latime fixa */
.admin-edit-label--inline {
    width: auto;
    color: var(--text-muted, #8b949e);
    font-weight: 500;
}

/* Selector rol */
.admin-role-select {
    background: var(--admin-role-select-bg, var(--bg-secondary, #0d1117));
    border: 1px solid var(--admin-border, var(--card-border, #30363d));
    border-radius: 5px;
    color: var(--admin-text-primary, var(--text-primary, #e6edf3));
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
}

/* Permisiuni module — checkboxes */
.admin-perms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-perm-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

.admin-perm-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #388bfd;
}

.admin-perm-item span {
    font-size: 12px;
    color: var(--text-primary, #e6edf3);
    text-transform: capitalize;
}

.admin-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* ============================================================================
   FEEDBACK inline
   ============================================================================ */

.admin-feedback {
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 5px;
    margin-top: 10px;
    display: none;
}
.admin-feedback.success { display: block; background: rgba(46,160,67,.12); border: 1px solid rgba(46,160,67,.3); color: #2ea043; }
.admin-feedback.error   { display: block; background: rgba(248,81,73,.12); border: 1px solid rgba(248,81,73,.3); color: #f85149; }

/* ============================================================================
   SERVER MANAGEMENT — sectiunea restart
   ============================================================================ */

.admin-server-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.admin-server-info {
    margin-bottom: 4px;
}

.admin-server-label {
    font-size: 13px;
    color: var(--admin-text-secondary, #8b949e);
}

/* Buton Restart Server */
.admin-restart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: #f85149;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.admin-restart-btn:hover:not(:disabled) {
    background: rgba(248, 81, 73, 0.22);
    border-color: rgba(248, 81, 73, 0.7);
    transform: translateY(-1px);
}

.admin-restart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Backup DB wrap */
.admin-backup-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--admin-border, #21262d);
}

/* ============================================================================
   SYSTEM MONITOR — card monitorizare resurse server
   ============================================================================ */

.sysmon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .sysmon-grid { grid-template-columns: repeat(2, 1fr); }
}

.sysmon-card {
    background: var(--admin-input-bg, ##22577a);
    border: 1px solid var(--admin-border, #21262d);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sysmon-label {
    font-size: 11px;
    font-weight: 600;
    color: #d4e1f3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sysmon-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-text, #e6edf3);
    line-height: 1;
}

.sysmon-value--uptime {
    font-size: 22px;
    font-family: monospace;
    color: #388bfd;
}

.sysmon-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.sysmon-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.5s ease;
    width: 0%;
}

.sysmon-bar--ok     { background: #2ea043; }
.sysmon-bar--warn   { background: #d29922; }
.sysmon-bar--danger { background: #f85149; }

.sysmon-sub {
    font-size: 11px;
    color: var(--admin-text-secondary, #f7fbfe);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sysmon-refresh-note {
    font-size: 11px;
    color: var(--admin-text-secondary, #8b949e);
    text-align: right;
    padding-top: 4px;
}

/* Status restart */
.admin-restart-status {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    width: fit-content;
}

.admin-restart-status--loading {
    background: rgba(118, 101, 179, 0.12);
    border: 1px solid rgba(118, 101, 179, 0.3);
    color: var(--admin-text-secondary, #8b949e);
}

.admin-restart-status--success {
    background: rgba(46, 160, 67, 0.12);
    border: 1px solid rgba(46, 160, 67, 0.3);
    color: #2ea043;
}

.admin-restart-status--error {
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
}

/* ============================================================
   RESTART LOG — istoric restart-uri server
   ============================================================ */
.admin-restart-log {
    margin-top: 16px;
    width: 100%;
}

.admin-restart-log-header {
    font-size: 12px;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.admin-restart-log-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-restart-log-row {
    display: grid;
    grid-template-columns: 24px 1fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
    color: #8b949e;
}

.admin-restart-log-row--first {
    background: rgba(35, 134, 54, 0.08);
    border-color: rgba(35, 134, 54, 0.25);
    color: #e6edf3;
}

.admin-restart-log-icon {
    font-size: 14px;
    text-align: center;
}

.admin-restart-log-date {
    font-family: monospace;
    font-size: 11px;
    color: #8b949e;
}

.admin-restart-log-row--first .admin-restart-log-date {
    color: #c9d1d9;
}

.admin-restart-log-method {
    font-weight: 500;
    color: #58a6ff;
}

.admin-restart-log-user {
    color: #8b949e;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-restart-log-empty {
    font-size: 12px;
    color: #484f58;
    padding: 8px 0;
}

/* ============================================================================
   BRANDING EDITOR — sub-pagina Pagina Login
   ============================================================================ */

.branding-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 4px 0;
}

/* Camp text/input */
.branding-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.branding-field--full {
    grid-column: 1 / -1;
}

.branding-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branding-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--admin-section-bg, #161b22);
    border: 1px solid var(--admin-border, #30363d);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--admin-text-primary, #e6edf3);
    outline: none;
    transition: border-color 0.2s;
}

.branding-input:focus {
    border-color: #388bfd;
    box-shadow: 0 0 0 3px rgba(56,139,253,0.15);
}

.branding-hint {
    font-size: 11px;
    color: var(--admin-text-secondary, #8b949e);
}

/* Optiuni fundal (radio buttons culoare/imagine) */
.branding-bg-options {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.branding-bg-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--admin-text-primary, #e6edf3);
    cursor: pointer;
}

/* Rand culoare — swatch + hex */
.branding-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.branding-color-input {
    width: 40px;
    height: 36px;
    border: 1px solid var(--admin-border, #30363d);
    border-radius: 6px;
    padding: 2px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.branding-color-hex {
    font-size: 13px;
    font-family: monospace;
    color: var(--admin-text-secondary, #8b949e);
}

/* Grila 1 coloana pentru culori — label + swatch pe aceeasi linie */
.branding-colors-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--admin-border, #21262d);
    border-radius: 8px;
    overflow: hidden;
    padding: 0 12px;
}

.branding-color-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--admin-border, #21262d);
}

.branding-color-item:last-child {
    border-bottom: none;
}

.branding-color-item .branding-label {
    margin: 0;
    flex: 1;
}

/* Zona upload (drag & drop) */
.branding-upload-zone {
    border: 2px dashed var(--admin-border, #30363d);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--admin-text-secondary, #8b949e);
    font-size: 13px;
    text-align: center;
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
}

.branding-upload-zone:hover {
    border-color: #388bfd;
    background: rgba(56,139,253,0.04);
}

.branding-upload-link {
    color: #388bfd;
    cursor: pointer;
    text-decoration: underline;
}

/* Preview imagine fundal */
.branding-bg-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px;
    background: var(--admin-section-bg, #161b22);
    border: 1px solid var(--admin-border, #30363d);
    border-radius: 8px;
}

.branding-bg-preview img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--admin-border, #30363d);
}

.branding-remove-btn {
    background: transparent;
    border: 1px solid #f85149;
    color: #f85149;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.branding-remove-btn:hover {
    background: rgba(248,81,73,0.1);
}

/* Logo curent + upload */
.branding-logo-wrap {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.branding-logo-current {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.branding-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--admin-border, #30363d);
    border-radius: 10px;
    padding: 8px;
    background: var(--admin-section-bg, #0d1117);
}

.branding-logo-wrap .branding-upload-zone {
    flex: 1;
    min-width: 200px;
}

/* Actiuni (butoane + feedback) */
.branding-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.branding-reset-btn {
    background: transparent;
    border: 1px solid var(--admin-border, #30363d);
    color: var(--admin-text-secondary, #8b949e);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.branding-reset-btn:hover {
    border-color: var(--admin-text-secondary, #8b949e);
    color: var(--admin-text-primary, #e6edf3);
}

/* Feedback inline (ok/err) */
.branding-feedback {
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
}

.branding-feedback--ok  { color: #2ea043; }
.branding-feedback--err { color: #f85149; }

/* ============================================================================
   CARD LIMBI — editor limbi custom pentru pagina login
   ============================================================================ */

/* Nota limbi built-in */
.lang-builtin-note {
    font-size: 12px;
    color: var(--admin-text-secondary, #8b949e);
    background: rgba(56,139,253,0.07);
    border: 1px solid rgba(56,139,253,0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 1px;
    line-height: 1.5;
}

/* Lista limbi custom (pills) */
.lang-custom-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    /*min-height: 36px;*/
}

.lang-no-custom {
    font-size: 12px;
    color: var(--admin-text-secondary, #8b949e);
    padding: 6px 0;
}

.lang-custom-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 139, 253, 0.07);
    border: 1px solid rgba(56, 139, 253, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
}

.lang-custom-code {
    display: none;
}

.lang-custom-name {
    color: #64748b;
    font-weight: 500;
    line-height: 1.5;
}

.lang-custom-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: #8b949e;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}
.lang-custom-delete:hover { color: #f85149; }

/* Titlu sectiune adaugare */
.lang-add-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text, #e6edf3);
    margin-bottom: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--admin-border, #21262d);
}

/* Meta: cod + nume pe un rand */
.lang-add-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.lang-add-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lang-code-input {
    font-family: monospace;
    text-transform: lowercase;
}

.lang-field-hint {
    font-size: 11px;
    color: var(--admin-text-secondary, #8b949e);
}

/* Editor 2 coloane */
.lang-editor-wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

/* Header coloana */
.lang-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text-secondary, #8b949e);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Buton copy mic */
.admin-btn--copy-ref {
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(56,139,253,0.1);
    border: 1px solid rgba(56,139,253,0.25);
    color: #388bfd;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.admin-btn--copy-ref:hover { background: rgba(56,139,253,0.18); }

/* Tabel referinta romana */
.lang-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    border: 1px solid var(--admin-border, #21262d);
    border-radius: 6px;
    overflow: hidden;
}

.lang-ref-row:nth-child(even) { background: rgba(255,255,255,0.02); }

.lang-ref-key {
    padding: 5px 8px;
    color: var(--admin-text-secondary, #8b949e);
    white-space: nowrap;
    width: 42%;
    border-right: 1px solid var(--admin-border, #21262d);
    vertical-align: top;
}

.lang-ref-val {
    padding: 5px 8px;
    color: var(--admin-text, #0e69b6);
    word-break: break-word;
    line-height: 1.4;
}

/* Textarea traducere */
.lang-trans-textarea {
    width: 100%;
    box-sizing: border-box;
    height: 520px;
    background: var(--admin-input-bg, #284165);
    border: 1px solid var(--admin-border, #21262d);
    border-radius: 6px;
    color: var(--admin-text, #ffffff);
    font-size: 12px;
    line-height: 1.8;
    padding: 8px 10px;
    resize: vertical;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s;
}
.lang-trans-textarea:focus { border-color: rgba(56,139,253,0.5); }
.lang-trans-textarea::placeholder { color: var(--admin-text-secondary, #8b949e); font-size: 11px; }

/* Actiuni salvare */
.lang-add-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================================================
   PREVIEW LIVE — iframe pagina login
   ============================================================================ */

.login-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-preview-iframe {
    width: 100%;
    height: 520px;
    border: 1px solid var(--admin-border, #21262d);
    border-radius: 8px;
    background: #0d1117;
    display: block;
    /* Dezactiveaza interactiunea — e doar preview */
    pointer-events: none;
    /* Scale down pentru a arata intreaga pagina */
    transform-origin: top left;
}

.login-preview-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-preview-hint {
    font-size: 11px;
    color: var(--admin-text-secondary, #8b949e);
}

/* ============================================================================
   COLLAPSE/EXPAND — carduri collapsible in admin
   ============================================================================ */

/* Header devine clickable */
.admin-section--collapsible .admin-section-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-section--collapsible .admin-section-header:hover {
    background: rgba(139,148,158,0.06);
}

/* Chevron SVG */
.admin-section-chevron {
    flex-shrink: 0;
    color: var(--admin-text-secondary, #8b949e);
    transition: transform 0.22s ease;
    margin-left: auto;
}

/* Cand e colapsat — chevron rotit */
.admin-section--collapsed .admin-section-chevron {
    transform: rotate(-90deg);
}

/* Body ascuns cand e colapsat — animatie smooth */
.admin-section--collapsible .admin-section-body {
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.22s ease;
    max-height: 2000px;
    opacity: 1;
}

.admin-section--collapsed .admin-section-body {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

/* ============================================================================
   MENTENANTA — toggle switch + preview banner in Admin
   ============================================================================ */

.maintenance-config-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.maintenance-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.maintenance-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-primary, #e6edf3);
    min-width: 90px;
}

/* Toggle switch reutilizat */
.admin-toggle-switch {
    position: relative;
    display: inline-block;
    width: 58px;
    height: 26px;
    flex-shrink: 0;
}
.admin-toggle-switch input { opacity: 0; width: 0; height: 0; }
.admin-toggle-slider {
    position: absolute;
    inset: 0;
    background: #9ca3af;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s;
}
.admin-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
    z-index: 1;
}
/* Textul OFF (stare inactiva) */
.admin-toggle-slider::after {
    content: 'OFF';
    position: absolute;
    right: 5px; top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}
.admin-toggle-switch input:checked + .admin-toggle-slider { background: #2ea043; }
.admin-toggle-switch input:checked + .admin-toggle-slider::before { transform: translateX(32px); }
/* Textul ON (stare activa) */
.admin-toggle-switch input:checked + .admin-toggle-slider::after {
    content: 'ON';
    right: auto;
    left: 6px;
}

.maintenance-toggle-hint {
    font-size: 12px;
    color: var(--admin-text-secondary, #8b949e);
}

/* Preview banner in Admin */
.maintenance-preview-banner {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.maintenance-preview-banner--warning {
    background: rgba(210,153,34,0.15);
    border: 1px solid rgba(210,153,34,0.4);
    color: #b07d10;
}
.maintenance-preview-banner--info {
    background: rgba(56,139,253,0.1);
    border: 1px solid rgba(56,139,253,0.3);
    color: #388bfd;
}
.maintenance-preview-banner--error {
    background: rgba(248,81,73,0.1);
    border: 1px solid rgba(248,81,73,0.35);
    color: #f85149;
}

/* ============================================================================
   BADGE ONLINE / OFFLINE — user cards
   ============================================================================ */

.user-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}
.user-online-badge--online  { background: rgba(46,160,67,0.15); color: #2ea043; }
.user-online-badge--offline { background: rgba(139,148,158,0.1); color: #8b949e; }

/* Dot CSS pentru Online/Offline — inlocuieste emoji 🟢⚫ */
.user-online-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.user-online-badge--online  .user-online-dot { background: #2ea043; }
.user-online-badge--offline .user-online-dot { background: #8b949e; }

/* Buton Activitate */
.admin-btn--activity {
    background: rgba(56,139,253,0.12);
    color: #388bfd;
    border: 1px solid rgba(56,139,253,0.25);
}
.admin-btn--activity:hover { background: rgba(56,139,253,0.22); }

/* ============================================================================
   MODAL ISTORIC ACTIVITATE
   ============================================================================ */

.login-history-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-history-modal {
    background: #355887;
    border: 1px solid var(--admin-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    width: 560px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-history-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border, rgba(255,255,255,0.08));
}

.login-history-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-primary, #e6edf3);
}

.login-history-modal-close {
    background: none;
    border: none;
    color: var(--admin-text-secondary, #8b949e);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}
.login-history-modal-close:hover { background: rgba(255,255,255,0.08); color: #e6edf3; }

.login-history-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
}

.lh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.lh-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--admin-text-secondary, #8b949e);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--admin-border, rgba(255,255,255,0.08));
}
.lh-table td {
    padding: 9px 10px;
    color: var(--admin-text-primary, #e6edf3);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lh-table tr:last-child td { border-bottom: none; }
.lh-ip { font-family: monospace; font-size: 12px; color: var(--admin-text-secondary, #8b949e); }
.lh-success { color: #2ea043; font-weight: 600; }
.lh-fail    { color: #f85149; font-weight: 600; }

/* ============================================================================
   CARD ANUNTURI
   ============================================================================ */

.announcement-form { display: flex; flex-direction: column; gap: 12px; }

.announcement-current {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(46,160,67,0.08);
    border: 1px solid rgba(46,160,67,0.25);
    border-radius: 8px;
    flex-wrap: wrap;
}
.announcement-current-label {
    font-size: 12px;
    font-weight: 600;
    color: #2ea043;
    flex-shrink: 0;
}
.announcement-current-text {
    flex: 1;
    font-size: 13px;
    color: var(--admin-text-primary, #e6edf3);
    min-width: 0;
}
.announcement-none {
    font-size: 13px;
    color: var(--admin-text-secondary, #8b949e);
    font-style: italic;
}
.admin-btn--danger-sm {
    background: rgba(248,81,73,0.12);
    color: #f85149;
    border: 1px solid rgba(248,81,73,0.25);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-btn--danger-sm:hover { background: rgba(248,81,73,0.22); }

/* ============================================================================
   BANNER ANUNT GLOBAL — afisat in aplicatie deasupra continutului
   ============================================================================ */

.global-announcement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 800;
    border-bottom: 1px solid transparent;
}
.global-announcement--info    { background: rgba(56,139,253,0.12);  border-color: rgba(56,139,253,0.3);  color: #388bfd; }
.global-announcement--warning { background: rgba(210,153,34,0.14);  border-color: rgba(210,153,34,0.35); color: #b07d10; }
.global-announcement--error   { background: rgba(248,81,73,0.12);   border-color: rgba(248,81,73,0.3);   color: #f85149; }
.global-announcement--success { background: rgba(46,160,67,0.12);   border-color: rgba(46,160,67,0.3);   color: #2ea043; }

.global-announcement-icon { font-size: 15px; flex-shrink: 0; }
.global-announcement-text { flex: 1; }
.global-announcement-close {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.global-announcement-close:hover { opacity: 1; }

/* ============================================================================
   LIGHT MODE — suprascrieri pentru Admin Panel
   Body fara .dark-theme si fara .custom-theme = Light mode (default)
   ============================================================================ */

body:not(.dark-theme):not(.custom-theme) .sysmon-value {
    color: #22577a;
}

body:not(.dark-theme):not(.custom-theme) .sysmon-value--uptime {
    color: #22577a;
}

body:not(.dark-theme):not(.custom-theme) .sysmon-label {
    color: #22577a;
    opacity: 0.75;
}

body:not(.dark-theme):not(.custom-theme) .sysmon-sub {
    color: #22577a;
    opacity: 0.65;
}

body:not(.dark-theme):not(.custom-theme) .sysmon-refresh-note {
    color: #22577a;
    opacity: 0.65;
}
