:root {
      --primary: #FF4D4D;
      --secondary: #FF8E8E;
      --accent: #f6ad55;
      --dark: #2d1211;
      --light: #f7f0f0;
      --success: #48bb78;
      --error: #f56565;
      --text: #000000;
    }

    /* Reset & base */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Poppins', sans-serif;
      background: #f0f2f5;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 40px 10px;
    }

    /* Container */
    .admin-container,
    .history-panel {
      width: 100%;
      max-width: 800px;
      background: var(--light);
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      margin-bottom: 2rem;
      padding: 30px;
    }

    .admin-container h2 {
      font-size: 1.8rem;
      text-align: center;
      margin-bottom: 20px;
    }

    /* History Section */
    .history-panel {
      margin-top: 0;
    }

    .history-controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }

    .history-entry {
      position: relative;
      padding: 1rem;
      margin: 0.5rem 0;
      background: var(--light);
      border-left: 4px solid var(--accent);
      border-radius: 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .history-entry.created {
      border-left-color: var(--success);
    }

    .history-entry.updated {
      border-left-color: var(--accent);
    }

    .history-entry.deleted {
      border-left-color: var(--error);
    }

    /* hide the “⋮” icon on deleted entries */
    .history-entry.deleted .entry-actions {
      display: none;
    }

    .history-action {
      font-size: 1rem;
      font-weight: normal;
    }

    .history-meta {
      font-size: 0.85rem;
      color: #555;
    }

    .pagination-controls {
      display: flex;
      gap: 1rem;
      align-items: center;
    }

    .entry-actions i {
      cursor: pointer;
      font-size: 1.2rem;
    }

    /* Form fields */
    .form-field {
      margin-bottom: 15px;
    }

    .form-field label {
      display: block;
      margin-bottom: 6px;
      font-weight: 500;
    }

    .form-field input,
    .form-field textarea,
    .form-field select {
      width: 100%;
      padding: 12px 15px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-size: 1rem;
    }

    .form-field textarea {
      min-height: 80px;
    }

    /* Buttons row */
    .button-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 20px;
    }

    .button-row button {
      flex: 1;
      padding: 12px;
      border: none;
      border-radius: 6px;
      font-size: 1rem;
      cursor: pointer;
    }

    .button-row .primary {
      background: var(--primary);
    }

    .button-row .secondary {
      background: var(--secondary);
    }

    /* Context Menu */
    .context-menu {
      position: absolute;
      background: var(--light);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      border-radius: 6px;
      padding: 0.5rem;
      z-index: 1000;
    }

    .context-item {
      padding: 0.5rem 1rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .context-item:hover {
      background: var(--secondary);
    }

    /* Responsive tweaks */
    @media (max-width: 768px) {
      .history-controls {
        flex-direction: column;
        gap: 1rem;
      }

      .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
      }

      .history-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
      }

      .form-field input,
      .form-field select {
        font-size: 14px;
      }
    }

    /* Modals */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: var(--light);
      padding: 20px;
      border-radius: 10px;
      width: 100%;
      max-width: 450px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
      animation: fadeIn 0.3s ease-out;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: scale(0.9);
      }

      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .modal-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      font-size: 1.2rem;
    }

    .modal-content textarea {
      width: 100%;
      height: 200px;
    }

    .modal-content pre {
      background: #f7f7f7;
      padding: 10px;
      border-radius: 6px;
      max-height: 300px;
      overflow-y: auto;
      font-family: monospace;
    }

    /* Notification banners */
    .notification-banner {
      position: fixed;
      top: 20px;
      right: 20px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 20px;
      border-radius: 6px;
      color: #fff;
      font-size: 1rem;
      z-index: 10000;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      opacity: 0;
      animation: fadeInBanner 0.3s forwards;
    }

    .notification-banner.success {
      background: var(--success);
    }

    .notification-banner.error {
      background: var(--error);
    }

    .notification-banner.info {
      background: var(--accent);
    }

    @keyframes fadeInBanner {
      to {
        opacity: 1;
      }
    }

    /* drop‑down icon */
    .history-entry.deleted .dropdown-icon {
      cursor: pointer;
      margin-left: 0.5rem;
      color: var(--error);
    }

    /* container for child entries, hidden by default */
    .history-entry.deleted+.children-entries {
      display: none;
      margin-left: 1.5rem;
    }

    /* when expanded, show them */
    .history-entry.deleted.expanded+.children-entries {
      display: block;
    }

    /* ensure no context‐menu icon ever shows for deleted+children */
    .history-entry.deleted .entry-actions,
    .children-entries .history-entry .entry-actions {
      display: none !important;
    }

    /* a quick flash background when we scroll to it */
    .history-entry.highlight {
      animation: flash 10s ease-out;
    }

    @keyframes flash {
      0% {
        background: #fff9c4;
      }

      50% {
        background: transparent;
      }

      100% {
        background: #fff9c4;
      }
    }