/* =====================
   📁 cabinet.css — стилі для профілю користувача
   ===================== */

   :root {
    --bg-light: #ffffff;
    --bg-box: #f9f9f9;
    --border: #ddd;
    --accent: #4caf50;
    --text-main: #222;
    --text-muted: #666;
    --radius: 10px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    --font-main: "Segoe UI", sans-serif;
  }
  
  body {
    font-family: var(--font-main);
    color: var(--text-main);
  }

  .profile-hover-wrapper {
    position: relative;
    display: inline-block;
  }
  
  #profileBtn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background-color: #007acc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 2;
    position: relative;
    transition: transform 0.2s ease;
  }
  
  #profileBtn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid white;
  }
  
  /* Блок з кнопками, який зʼявляється */
  .profile-hover-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 30px;
    padding: 4px 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1;
  }
  
  .profile-hover-wrapper:hover .profile-hover-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -60%);
  }
  
  .hover-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .hover-btn:hover {
    background-color: #f0f0f0;
  }
  
  body.dark .profile-hover-menu {
    background: #333;
    border-color: #555;
  }
  
  body.dark .hover-btn {
    color: #fff;
  }
  
  body.dark .hover-btn:hover {
    background: #444;
  }
  
  /* ========== Модалка ========== */
  #cabinetModal {
    display: none;
    position: fixed;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 700px;
    width: 95%;
    max-height: 90vh; /* ВАЖЛИВО */
    overflow-y: auto;  /* ДОДАНО */
    z-index: 1000;
  }
  
  /* ========== Профіль ========== */
  .profile-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
  }
  
  .profile-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
  }
  
  .profile-body p {
    margin: 3px 0;
    color: var(--text-muted);
  }
  
  .profile-bio {
    background: var(--bg-box);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
  }
  
  /* ========== Скіли ========== */
  .skill-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
  }
  
  @media (max-width: 768px) {
    .skill-columns {
      grid-template-columns: 1fr; /* на мобілках — 1 колонка */
    }
  }

  .skill-entry {
    margin-bottom: 8px;
  }
  
  .skill-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-main);
  }
  
  .skill-bar {
    background: #e0e0e0;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
  }
  
  .skill-bar-fill {
    background: var(--accent);
    height: 8px;
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
  }
  
  .range-input {
    width: 100%;
    accent-color: var(--accent);
  }
  
  /* ========== Кнопки ========== */
  .btn-edit {
    padding: 6px 12px;
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .btn-edit:hover {
    background: #e6e6e6;
  }
  
  .btn-primary {
    padding: 6px 10px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
  }
  
  .btn-primary:hover {
    background: #43a047;
  }
  
  /* ========== Селектор мов ========== */
  .skill-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
  }
  
  .skill-selector select {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
  } 
  
  .skill-selector button {
    white-space: nowrap;
  }
  
  .modal-header-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    z-index: 10;
  }
  
  .btn-icon {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease-in-out;
  }
  
  .btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.2s, color 0.2s;
  }
  
  .btn-secondary:hover {
    background-color: #e0e0e0;
  }
  
  body.dark .btn-secondary {
    background-color: #444;
    color: #eee;
    border: 1px solid #666;
  }
  
  body.dark .btn-secondary:hover {
    background-color: #555;
  }

  .log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
  }
  
  .log-table th, .log-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }
  
  .log-table thead {
    background-color: #f8f8f8;
    color: #333;
  }
  
  .log-table tbody tr:hover {
    background-color: #f0f0f0;
  }
  
 
  body.dark .log-table thead {
    background-color: #333;
    color: #fff;
  }
  
  body.dark .log-table tbody tr {
    border-bottom: 1px solid #555;
  }
  
  body.dark .log-table tbody tr:hover {
    background-color: #444;
  }