/* ===================================================
   FIB SITE — lk.css  v3
   =================================================== */

/* ── КНОПКА ЛК ────────────────────────────── */
.lk-btn {
  position: fixed; top: 18px; right: 18px; z-index: 1000;
  width: 44px; height: 44px;
  background: rgba(10,12,16,0.75);
  border: 1.5px solid rgba(201,168,76,0.35);
  border-radius: 8px; color: var(--fib-gold);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: all 0.25s ease;
}
.lk-btn:hover { background: rgba(201,168,76,0.15); border-color: var(--fib-gold); transform: scale(1.08); }
.lk-btn svg   { width: 22px; height: 22px; }
.lk-btn.logged-in { border-color: rgba(46,204,113,0.5); color: #2ecc71; }
.lk-btn.logged-in:hover { background: rgba(46,204,113,0.1); border-color: #2ecc71; }

/* ── ЭКРАН ЛК ─────────────────────────────── */
#screen-lk { background: #070b13; }
.lk-bg {
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(15,35,90,0.55) 0%, transparent 70%),
    linear-gradient(180deg, #070b13 0%, #050810 100%);
}
.lk-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── ЦЕНТРИРУЮЩАЯ ОБЁРТКА ─────────────────── */
.lk-wrap {
  position: relative; z-index: 2; flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 70px 20px 20px;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════
   AUTH PANEL
═══════════════════════════════════════════════ */
.auth-panel {
  width: 100%; max-width: 400px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 12px; padding: 36px 32px;
  backdrop-filter: blur(12px);
  animation: fadeSlideUp 0.4s ease both;
}

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-text {
  font-family: var(--font-logo); font-size: 44px; font-weight: 900;
  color: var(--fib-gold); letter-spacing: 8px;
  text-shadow: 0 0 30px rgba(201,168,76,0.35); line-height: 1;
}
.auth-logo-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px;
  color: rgba(201,168,76,0.4); margin-top: 4px;
}

.auth-tabs {
  display: flex; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 3px; margin-bottom: 26px;
}
.auth-tab {
  flex: 1; padding: 9px 0; background: transparent; border: none;
  color: rgba(255,255,255,0.4); font-family: var(--font-display);
  font-size: 15px; letter-spacing: 2px; cursor: pointer;
  border-radius: 6px; transition: all 0.2s;
}
.auth-tab.active {
  background: rgba(201,168,76,0.12);
  color: var(--fib-gold);
  border: 1px solid rgba(201,168,76,0.25);
}

.auth-field { margin-bottom: 18px; }
.auth-label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; color: rgba(255,255,255,0.38);
  text-transform: uppercase; margin-bottom: 7px;
}
.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
  padding: 11px 38px 11px 13px; font-family: var(--font-ui);
  font-size: 15px; color: #d0d8f0; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.auth-input::placeholder { color: rgba(255,255,255,0.18); }
.auth-input:focus  { border-color: rgba(201,168,76,0.4); background: rgba(255,255,255,0.07); }
.auth-input.valid   { border-color: rgba(46,204,113,0.5); }
.auth-input.invalid { border-color: rgba(220,60,60,0.5);  }

.auth-input-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; pointer-events: none;
}
.auth-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.3);
  cursor: pointer; font-size: 14px; padding: 0; transition: color 0.2s;
}
.auth-eye:hover { color: rgba(255,255,255,0.6); }

.auth-hint { font-size: 12px; margin-top: 5px; min-height: 15px; }
.auth-hint.ok    { color: #2ecc71; }
.auth-hint.error { color: #e05050; }
.auth-hint.info  { color: rgba(201,168,76,0.7); }

.pwd-strength { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.pwd-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.pwd-fill { height: 100%; width: 0%; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.pwd-label { font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; }

.auth-error {
  background: rgba(220,50,50,0.1); border: 1px solid rgba(220,50,50,0.3);
  border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #f08080;
  margin-bottom: 14px; animation: fadeSlideUp 0.25s ease both;
}
.auth-submit {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, rgba(201,168,76,0.18), rgba(201,168,76,0.07));
  border: 1px solid rgba(201,168,76,0.35); border-radius: 8px;
  color: var(--fib-gold); font-family: var(--font-display);
  font-size: 17px; letter-spacing: 3px; cursor: pointer;
  transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 6px;
}
.auth-submit:hover { background: rgba(201,168,76,0.2); border-color: var(--fib-gold); transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-spinner { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   PROFILE PANEL
═══════════════════════════════════════════════ */
.profile-panel {
  width: 100%; max-width: 580px;
  animation: fadeSlideUp 0.4s ease both;
  display: flex; flex-direction: column; gap: 0;
}

/* Header */
.profile-header {
  display: flex; align-items: center; gap: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 12px; padding: 22px 24px;
  margin-bottom: 12px;
}
.profile-avatar {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid rgba(201,168,76,0.35);
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.07);
}
.profile-avatar-inner {
  font-family: var(--font-logo); font-size: 30px; font-weight: 900;
  color: var(--fib-gold); text-shadow: 0 0 16px rgba(201,168,76,0.4);
}
.profile-header-info { flex: 1; min-width: 0; }
.profile-nickname {
  font-family: var(--font-display); font-size: 26px; letter-spacing: 3px;
  color: #d0d8f0; line-height: 1; margin-bottom: 7px;
}
.profile-dept { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 1px; margin-top: 4px; }

/* Role badge colors */
.profile-role-badge {
  display: inline-block; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1.5px;
  padding: 3px 12px; border-radius: 20px; border: 1px solid;
}
.role-dev             { background: rgba(180,80,255,0.12); border-color: rgba(180,80,255,0.35); color: #c880ff; }
.role-director        { background: rgba(201,168,76,0.12); border-color: rgba(201,168,76,0.35); color: var(--fib-gold); }
.role-deputy_director { background: rgba(26,115,232,0.12); border-color: rgba(26,115,232,0.35); color: #6ba8f5; }
.role-head_of         { background: rgba(46,204,113,0.10); border-color: rgba(46,204,113,0.3);  color: #50d890; }
.role-dhead_of        { background: rgba(46,180,113,0.08); border-color: rgba(46,180,113,0.2);  color: #40b878; }
.role-agent           { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: #8090a8; }

/* Meta grid */
.profile-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 12px;
}
.pmeta-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 12px 16px;
}
.pmeta-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); text-transform: uppercase; margin-bottom: 5px; }
.pmeta-val   { font-size: 13px; color: #8090a8; }

/* Inner tabs */
.profile-inner-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 3px; margin-bottom: 12px;
}
.pit {
  flex: 1; padding: 8px 4px; background: transparent; border: none;
  color: rgba(255,255,255,0.35); font-family: var(--font-ui);
  font-size: 13px; cursor: pointer; border-radius: 6px; transition: all 0.2s;
}
.pit:hover  { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }
.pit.active { background: rgba(201,168,76,0.1); color: var(--fib-gold); border: 1px solid rgba(201,168,76,0.2); }

/* Pit content */
.pit-content         { display: none; }
.pit-content.active  { display: block; }
.pit-loading         { text-align: center; padding: 24px; color: rgba(255,255,255,0.25); font-size: 13px; }
.pit-empty           { text-align: center; padding: 24px; color: rgba(255,255,255,0.2);  font-size: 13px; }

/* Sessions */
.sessions-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.session-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 12px 14px;
}
.session-icon  { font-size: 18px; flex-shrink: 0; opacity: 0.7; }
.session-info  { flex: 1; min-width: 0; }
.session-main  { font-size: 14px; color: #a0b0c8; display: flex; align-items: center; gap: 8px; }
.session-meta  { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 3px; font-family: var(--font-mono); }
.session-current { background: rgba(46,204,113,0.15); color: #2ecc71; font-size: 10px; padding: 2px 8px; border-radius: 10px; letter-spacing: 1px; }
.session-this  { color: #2ecc71; font-size: 18px; margin-left: auto; }
.session-kill {
  background: rgba(220,50,50,0.1); border: 1px solid rgba(220,50,50,0.2);
  color: #e05050; width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.session-kill:hover { background: rgba(220,50,50,0.2); border-color: rgba(220,50,50,0.5); }

.pit-action-btn {
  width: 100%; padding: 10px; border-radius: 7px;
  font-family: var(--font-ui); font-size: 13px; cursor: pointer; transition: all 0.2s;
  margin-top: 4px;
}
.pit-action-btn.danger {
  background: rgba(220,50,50,0.06); border: 1px solid rgba(220,50,50,0.2); color: #c05050;
}
.pit-action-btn.danger:hover { background: rgba(220,50,50,0.14); border-color: rgba(220,50,50,0.4); }

/* History */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 10px 14px;
}
.history-num {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: rgba(255,255,255,0.3); font-family: var(--font-mono);
}
.history-main { font-size: 13px; color: #8090a8; }
.history-meta { font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 2px; font-family: var(--font-mono); }

/* Roles table */
.roles-search { margin-bottom: 10px; }
.roles-search .auth-input { padding: 9px 13px; font-size: 13px; }
.roles-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid rgba(255,255,255,0.07); }
.roles-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.roles-table th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.3); padding: 10px 12px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.02);
}
.roles-table td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #8090a8; vertical-align: middle; }
.roles-table tr:last-child td { border-bottom: none; }
.roles-table tr:hover td { background: rgba(255,255,255,0.02); }
.rt-nick   { font-weight: 600; color: #a8b8d0; }
.rt-locked { text-align: center; opacity: 0.4; }
.rt-dept-cell { font-family: var(--font-mono); font-size: 11px; }
.role-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  padding: 2px 9px; border-radius: 12px; border: 1px solid;
}
.rt-select {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px; color: #c0d0e8; font-family: var(--font-ui); font-size: 12px;
  padding: 5px 8px; outline: none; cursor: pointer; width: 100%;
}
.rt-select:focus { border-color: rgba(201,168,76,0.4); }
.rt-dept { max-width: 80px; }
.rt-save-btn {
  background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.25);
  color: var(--fib-gold); border-radius: 5px; padding: 5px 12px;
  font-family: var(--font-ui); font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.rt-save-btn:hover { background: rgba(201,168,76,0.2); border-color: rgba(201,168,76,0.5); }

/* Profile actions */
.profile-actions { margin-top: 14px; display: flex; justify-content: center; }
.profile-logout {
  padding: 10px 28px;
  background: rgba(220,50,50,0.08); border: 1px solid rgba(220,50,50,0.22);
  border-radius: 7px; color: #d05050; font-family: var(--font-display);
  font-size: 15px; letter-spacing: 2px; cursor: pointer; transition: all 0.2s;
}
.profile-logout:hover { background: rgba(220,50,50,0.18); border-color: rgba(220,50,50,0.45); }

/* LK Footer */
.lk-footer { border-top-color: rgba(201,168,76,0.08); }
