:root {
      --blue: #0057b8;
      --blue-dark: #003b7a;
      --blue-light: #eaf4ff;

      --orange: #ede4db;
      --orange-dark: #eae5e1;
      --orange-light: #fff1e3;

      --white: #ffffff;
      --black: #0b1728;
      --text: #26364a;
      --muted: #718096;

      --border: #e6ebf2;
      --light: #f7f9fc;
      --success: #16834b;
      --success-light: #e9f8f0;
      --danger: #c92a2a;
      --danger-light: #fff0f0;
      --warning: #a56800;
      --warning-light: #fff7df;

      --radius-sm: 10px;
      --radius-md: 18px;
      --radius-lg: 28px;

      --shadow-sm: 0 8px 25px rgba(11, 23, 40, 0.06);
      --shadow-md: 0 18px 45px rgba(11, 23, 40, 0.10);

      --sidebar: 260px;
      --topbar: 76px;

      --font-body: "DM Sans", sans-serif;
      --font-heading: "Plus Jakarta Sans", sans-serif;

      --transition-fast: 0.2s ease;
      --transition-normal: 0.3s ease;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      min-height: 100vh;
      background: var(--light);
      color: var(--text);
      font-family: var(--font-body);
    }

    body.modal-open {
      overflow: hidden;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    /* =========================================
       SIDEBAR
    ========================================= */

    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: var(--sidebar);
      background: var(--white);
      border-right: 1px solid var(--border);
      z-index: 1000;
      display: flex;
      flex-direction: column;
    }

    .brand {
      height: var(--topbar);
      display: flex;
      align-items: center;
      padding: 0 24px;
      border-bottom: 1px solid var(--border);
    }

    .brand img {
      width: 142px;
      height: auto;
      display: block;
    }

    .sidebar-label {
      padding: 24px 24px 10px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .sidebar-nav {
      padding: 0 12px;
      overflow-y: auto;
      flex: 1;
    }

    .nav-link {
      min-height: 44px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 13px;
      margin-bottom: 4px;
      border-radius: 11px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      transition:
        background var(--transition-fast),
        color var(--transition-fast);
    }

    .nav-link:hover {
      background: var(--light);
      color: var(--blue);
    }

    .nav-link.active {
      background: var(--blue-light);
      color: var(--blue);
    }

    .nav-icon {
      width: 19px;
      height: 19px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 19px;
    }

    .nav-icon svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .sidebar-bottom {
      padding: 14px 12px;
      border-top: 1px solid var(--border);
    }

    .sidebar-user {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border-radius: 12px;
      background: var(--light);
    }

    .avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: var(--blue);
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 800;
      flex: 0 0 38px;
    }

    .sidebar-user-text {
      min-width: 0;
    }

    .sidebar-user-name {
      font-size: 12px;
      font-weight: 700;
      color: var(--black);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-user-role {
      margin-top: 2px;
      font-size: 11px;
      color: var(--muted);
      text-transform: capitalize;
    }

    /* =========================================
       MAIN
    ========================================= */

    .main {
      min-height: 100vh;
      margin-left: var(--sidebar);
    }

    .topbar {
      height: var(--topbar);
      position: sticky;
      top: 0;
      z-index: 900;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);

      display: flex;
      align-items: center;
      justify-content: space-between;

      padding: 0 34px;
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .mobile-menu-button {
      width: 42px;
      height: 42px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: var(--white);
      display: none;
      align-items: center;
      justify-content: center;
      color: var(--black);
    }

    .mobile-menu-button svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
    }

    .page-heading {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .page-heading h1 {
      font-family: var(--font-heading);
      color: var(--black);
      font-size: 20px;
      line-height: 1.2;
      font-weight: 800;
    }

    .page-heading p {
      color: var(--muted);
      font-size: 12px;
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .notification-button {
      width: 42px;
      height: 42px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: var(--white);
      color: var(--text);

      display: flex;
      align-items: center;
      justify-content: center;

      position: relative;
    }

    .notification-button svg {
      width: 19px;
      height: 19px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .notification-dot {
      position: absolute;
      width: 7px;
      height: 7px;
      right: 9px;
      top: 8px;
      background: var(--orange);
      border: 2px solid var(--white);
      border-radius: 50%;
    }

    .topbar-user {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-left: 6px;
    }

    .topbar-user .avatar {
      width: 36px;
      height: 36px;
      flex-basis: 36px;
    }

    .topbar-user-info {
      display: flex;
      flex-direction: column;
    }

    .topbar-user-name {
      font-size: 12px;
      font-weight: 700;
      color: var(--black);
    }

    .topbar-user-role {
      font-size: 11px;
      color: var(--muted);
      text-transform: capitalize;
    }

    /* =========================================
       CONTENT
    ========================================= */

    .content {
      padding: 34px;
      max-width: 1600px;
      margin: 0 auto;
    }

    .page-intro {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 26px;
    }

    .page-intro h2 {
      font-family: var(--font-heading);
      color: var(--black);
      font-size: 27px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }

    .page-intro p {
      max-width: 650px;
      margin-top: 7px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.7;
    }

    .primary-button {
      min-height: 44px;
      border: 0;
      border-radius: 11px;
      padding: 0 17px;

      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;

      background: var(--blue);
      color: var(--white);

      font-size: 12px;
      font-weight: 700;

      transition:
        transform var(--transition-fast),
        background var(--transition-fast);
    }

    .primary-button:hover {
      background: var(--blue-dark);
      transform: translateY(-1px);
    }

    .primary-button svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
    }

    /* =========================================
       STAT CARDS
    ========================================= */

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 22px;
    }

    .stat-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 20px;
      box-shadow: var(--shadow-sm);
    }

    .stat-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .stat-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .stat-icon {
      width: 38px;
      height: 38px;
      border-radius: 11px;
      background: var(--blue-light);
      color: var(--blue);

      display: flex;
      align-items: center;
      justify-content: center;
    }

    .stat-icon svg {
      width: 19px;
      height: 19px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .stat-value {
      margin-top: 12px;
      color: var(--black);
      font-family: var(--font-heading);
      font-size: 27px;
      font-weight: 800;
    }

    .stat-description {
      margin-top: 4px;
      color: var(--muted);
      font-size: 11px;
    }

    /* =========================================
       TOOLBAR
    ========================================= */

    .panel {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
    }

    .toolbar {
      padding: 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      border-bottom: 1px solid var(--border);
    }

    .toolbar-left {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      flex-wrap: wrap;
    }

    .search-box {
      position: relative;
      min-width: 270px;
      flex: 1;
      max-width: 420px;
    }

    .search-box svg {
      position: absolute;
      left: 13px;
      top: 50%;
      transform: translateY(-50%);
      width: 17px;
      height: 17px;
      stroke: var(--muted);
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .search-box input,
    .filter-select {
      height: 42px;
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--white);
      color: var(--text);
      outline: none;
      font-size: 12px;
      transition: border var(--transition-fast), box-shadow var(--transition-fast);
    }

    .search-box input {
      padding: 0 13px 0 39px;
    }

    .filter-select {
      min-width: 145px;
      padding: 0 12px;
    }

    .search-box input:focus,
    .filter-select:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.09);
    }

    .secondary-button {
      height: 42px;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0 13px;

      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;

      background: var(--white);
      color: var(--text);

      font-size: 12px;
      font-weight: 700;
    }

    .secondary-button:hover {
      border-color: #cdd6e2;
      background: var(--light);
    }

    .secondary-button svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* =========================================
       EMPLOYEE TABLE
    ========================================= */

    .panel-heading {
      padding: 20px 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .panel-heading h3 {
      color: var(--black);
      font-family: var(--font-heading);
      font-size: 15px;
      font-weight: 800;
    }

    .panel-heading span {
      color: var(--muted);
      font-size: 11px;
    }

    .employee-table-wrap {
      overflow-x: auto;
      padding: 12px 18px 18px;
    }

    .employee-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 780px;
    }

    .employee-table th {
      padding: 13px 10px;
      border-bottom: 1px solid var(--border);
      color: var(--muted);
      text-align: left;
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      white-space: nowrap;
    }

    .employee-table td {
      padding: 15px 10px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      font-size: 12px;
    }

    .employee-table tbody tr:last-child td {
      border-bottom: 0;
    }

    .employee-table tbody tr:hover {
      background: #fbfcfe;
    }

    .employee-person {
      display: flex;
      align-items: center;
      gap: 11px;
      min-width: 210px;
    }

    .employee-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: var(--blue-light);
      color: var(--blue);

      display: flex;
      align-items: center;
      justify-content: center;

      font-size: 11px;
      font-weight: 800;
      flex: 0 0 38px;
    }

    .employee-name {
      color: var(--black);
      font-weight: 700;
    }

    .employee-email {
      margin-top: 2px;
      color: var(--muted);
      font-size: 10px;
    }


/* =========================================
   EMPLOYEE ROLE BADGES
========================================= */

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 27px;
  padding: 0 9px;

  border-radius: 999px;

  background: var(--white);
  color: var(--text);

  border: 1px solid var(--border);

  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

/* Owner */
.role-owner {
  background: var(--white);
  color: var(--blue);
  border-color: var(--blue);
}

/* Manager */
.role-manager {
  background: var(--white);
  color: var(--blue);
  border-color: var(--blue);
}

/* Staff */
.role-staff {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}

/* Designer */
.role-designer {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}



    .status-active {
      background: var(--success-light);
      color: var(--success);
    }

    .status-inactive {
      background: var(--danger-light);
      color: var(--danger);
    }

    .last-login {
      color: var(--muted);
      white-space: nowrap;
    }

    .action-group {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }

    .icon-button {
      width: 34px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: var(--white);
      color: var(--text);

      display: flex;
      align-items: center;
      justify-content: center;
    }

    .icon-button:hover {
      background: var(--light);
      color: var(--blue);
    }

    .icon-button.danger:hover {
      color: var(--danger);
      background: var(--danger-light);
    }

    .icon-button svg {
      width: 15px;
      height: 15px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* =========================================
       EMPTY STATE
    ========================================= */

    .empty-state {
      padding: 60px 24px;
      text-align: center;
      display: none;
    }

    .empty-state.visible {
      display: block;
    }

    .empty-icon {
      width: 54px;
      height: 54px;
      margin: 0 auto 14px;
      border-radius: 15px;
      background: var(--blue-light);
      color: var(--blue);

      display: flex;
      align-items: center;
      justify-content: center;
    }

    .empty-icon svg {
      width: 25px;
      height: 25px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.6;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .empty-state h3 {
      font-family: var(--font-heading);
      color: var(--black);
      font-size: 16px;
      font-weight: 800;
    }

    .empty-state p {
      max-width: 430px;
      margin: 7px auto 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.6;
    }

    /* =========================================
       MODAL
    ========================================= */

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2000;

      display: flex;
      align-items: center;
      justify-content: center;

      padding: 24px;

      background: rgba(7, 20, 36, 0.55);
      backdrop-filter: blur(5px);

      opacity: 0;
      visibility: hidden;
      transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal);
    }

    .modal-backdrop.open {
      opacity: 1;
      visibility: visible;
    }

    .modal {
      width: min(100%, 570px);
      max-height: min(760px, calc(100vh - 48px));
      overflow-y: auto;

      background: var(--white);
      border-radius: 20px;
      box-shadow: var(--shadow-md);

      transform: translateY(12px) scale(0.98);
      transition: transform var(--transition-normal);
    }

    .modal-backdrop.open .modal {
      transform: translateY(0) scale(1);
    }

    .modal-header {
      padding: 21px 22px;
      border-bottom: 1px solid var(--border);

      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .modal-header h3 {
      color: var(--black);
      font-family: var(--font-heading);
      font-size: 17px;
      font-weight: 800;
    }

    .modal-header p {
      margin-top: 4px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.5;
    }

    .modal-close {
      width: 34px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: var(--white);
      color: var(--muted);

      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 34px;
    }

    .modal-close:hover {
      color: var(--black);
      background: var(--light);
    }

    .modal-close svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
    }

    .modal-body {
      padding: 22px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .form-group.full {
      grid-column: 1 / -1;
    }

    .form-label {
      color: var(--black);
      font-size: 11px;
      font-weight: 700;
    }

    .form-label span {
      color: var(--muted);
      font-weight: 500;
    }

    .form-control {
      width: 100%;
      height: 44px;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0 12px;
      outline: none;
      background: var(--white);
      color: var(--text);
      font-size: 12px;
    }

    .form-control:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.09);
    }

    .role-description {
      margin-top: 7px;
      padding: 11px 12px;
      border-radius: 10px;
      background: var(--light);
      color: var(--muted);
      font-size: 10px;
      line-height: 1.6;
    }

    .permission-list {
      display: grid;
      gap: 8px;
      margin-top: 4px;
    }

    .permission-item {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 10px 11px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: var(--white);
    }

    .permission-item input {
      accent-color: var(--blue);
    }

    .permission-item span {
      color: var(--text);
      font-size: 11px;
      font-weight: 600;
    }

    .modal-footer {
      padding: 16px 22px;
      border-top: 1px solid var(--border);

      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 9px;
    }

    .danger-button {
      height: 42px;
      border: 0;
      border-radius: 10px;
      padding: 0 14px;
      background: var(--danger);
      color: var(--white);
      font-size: 12px;
      font-weight: 700;
    }

    .danger-button:hover {
      background: #aa2222;
    }

    /* =========================================
       CONFIRM MODAL
    ========================================= */

    .confirm-modal {
      width: min(100%, 440px);
    }

    .confirm-body {
      padding: 26px 22px;
    }

    .confirm-icon {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: var(--warning-light);
      color: var(--warning);

      display: flex;
      align-items: center;
      justify-content: center;

      margin-bottom: 14px;
    }

    .confirm-icon svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .confirm-body h3 {
      font-family: var(--font-heading);
      color: var(--black);
      font-size: 17px;
      font-weight: 800;
    }

    .confirm-body p {
      margin-top: 7px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.65;
    }

    /* =========================================
       MOBILE OVERLAY
    ========================================= */

    .sidebar-overlay {
      position: fixed;
      inset: 0;
      z-index: 950;
      background: rgba(7, 20, 36, 0.45);
      opacity: 0;
      visibility: hidden;
      transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal);
    }

    .sidebar-overlay.open {
      opacity: 1;
      visibility: visible;
    }

    /* =========================================
       ROLE CONTROL
    ========================================= */

    [data-role-only] {
      display: none !important;
    }

    body.role-owner [data-role-only~="owner"],
    body.role-manager [data-role-only~="manager"] {
      display: inline-flex !important;
    }

    body.role-owner [data-role-block~="owner"],
    body.role-manager [data-role-block~="manager"] {
      display: block !important;
    }

    /* =========================================
       RESPONSIVE
    ========================================= */

    @media (max-width: 1200px) {
      .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .content {
        padding: 28px;
      }
    }

    @media (max-width: 980px) {
      :root {
        --sidebar: 250px;
      }

      .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .main {
        margin-left: 0;
      }

      .mobile-menu-button {
        display: flex;
      }

      .topbar {
        padding: 0 20px;
      }

      .page-intro {
        align-items: flex-start;
        flex-direction: column;
      }

      .page-intro .primary-button {
        width: 100%;
      }
    }

    @media (max-width: 720px) {
      .content {
        padding: 22px 16px;
      }

      .topbar {
        padding: 0 16px;
      }

      .topbar-user-info {
        display: none;
      }

      .page-heading p {
        display: none;
      }

      .page-intro h2 {
        font-size: 23px;
      }

      .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
      }

      .stat-card {
        padding: 16px;
      }

      .stat-value {
        font-size: 23px;
      }

      .toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .toolbar-left {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
      }

      .search-box {
        width: 100%;
        max-width: none;
        min-width: 0;
      }

      .filter-select,
      .toolbar .secondary-button {
        width: 100%;
      }

      .form-grid {
        grid-template-columns: 1fr;
      }

      .form-group.full {
        grid-column: auto;
      }

      .modal-backdrop {
        padding: 12px;
      }

      .modal {
        max-height: calc(100vh - 24px);
      }
    }

    @media (max-width: 430px) {
      .stats-grid {
        grid-template-columns: 1fr;
      }

      .topbar-user .avatar {
        display: none;
      }

      .topbar-right {
        gap: 6px;
      }

      .notification-button {
        width: 38px;
        height: 38px;
      }

      .mobile-menu-button {
        width: 38px;
        height: 38px;
      }

      .page-intro p {
        font-size: 12px;
      }

      .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
      }

      .modal-footer button {
        width: 100%;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        transition: none !important;
      }
    }