/* =========================================================
   style.css
   Global styles + login/register sliding-panel design.
   ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, sans-serif; color: #2c3e50; background: #f5f7fb; }
a { color: #ff5f6d; text-decoration: none; }
img { max-width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  padding: 10px 18px; border-radius: 8px; border: none;
  font-weight: 600; font-size: 14px;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: linear-gradient(135deg,#ff5f6d,#ffc371); color: #fff; }
.btn-secondary { background: #ecf0f1; color: #2c3e50; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=email], input[type=file],
input[type=url], input[type=search], input[type=tel], input[type=number],
input[list], input:not([type]),
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d6dbe1;
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: #fff; color: #2c3e50;
  transition: border-color .12s, box-shadow .12s;
  margin-top: 4px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #ff5f6d; box-shadow: 0 0 0 3px rgba(255,95,109,.15);
}
label { display: block; font-size: 13px; font-weight: 600; margin-top: 12px; color: #4a5560; }
textarea { resize: vertical; }

/* =========================================================
   Centered Alert Modal (replaces old corner toasts)
   ========================================================= */
.alert-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 16px;
  animation: fadeIn .18s ease;
}
.alert-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,.32);
  text-align: center;
  animation: alertPop .25s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes alertPop {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.alert-modal-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.alert-modal-icon-success { background: linear-gradient(135deg,#27ae60,#2ecc71); }
.alert-modal-icon-error   { background: linear-gradient(135deg,#e74c3c,#c0392b); }
.alert-modal-icon-info    { background: linear-gradient(135deg,#3498db,#2980b9); }
.alert-modal-title {
  margin: 0 0 8px;
  font-size: 20px; font-weight: 700;
  color: #2c3e50;
}
.alert-modal-msg {
  margin: 0 0 22px;
  font-size: 14.5px; line-height: 1.5;
  color: #4a5560;
  word-break: break-word;
}
.alert-modal-actions {
  display: flex; justify-content: center;
}
.alert-modal-actions .btn {
  min-width: 110px;
  padding: 10px 26px;
  border-radius: 999px;
}

/* ---------- Toast (no button, auto-dismiss) ---------- */
.toast-overlay {
  /* slightly less dim backdrop because the toast is meant to feel light */
  background: rgba(0,0,0,.35);
}
.toast-modal {
  max-width: 360px;
  padding: 22px 24px 24px;
  animation: alertPop .25s cubic-bezier(.18,.89,.32,1.28);
}
.toast-modal .alert-modal-msg { margin-bottom: 0; }

/* ---------- modals ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000; padding: 16px; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 12px; padding: 24px 28px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: scaleIn .2s ease;
}
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h2 { margin-top: 0; }
.modal-confirm p { font-size: 16px; margin: 8px 0 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-note { max-width: 640px; }
.modal-media { max-width: 800px; }
.shared-list { list-style: none; padding: 0; margin: 8px 0; }
.shared-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.shared-list li:last-child { border-bottom: none; }
.muted { color: #7c8a9a; font-size: 13px; }

/* ---------- role badges ---------- */
.role-badge { display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.role-owner    { background: #ffe5d0; color: #d35400; }
.role-editor   { background: #d6eaff; color: #2980b9; }
.role-viewer   { background: #e2e6ec; color: #5a6877; }
.role-assignee { background: #fff3cd; color: #8a6d00; }
.role-default  { background: #eef2f6; color: #4a5560; }

/* ---------- generic status tags (used on user/drive rows) ---------- */
.status-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.status-approved { background: #e6f4ea; color: #2e7d32; }
.status-pending  { background: #fff3e0; color: #ef6c00; }
.status-rejected { background: #fdecea; color: #c62828; }

/* =========================================================
   Login / register design (mobile-first → desktop slider)
   ========================================================= */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
  padding: 20px;
}

/* === ERM Ticketing System title === */
.erm-title {
  font-family: 'Times New Roman', Times, serif;
  color: #ffffff;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 22px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}
@media (min-width: 701px) {
  .erm-title { font-size: 48px; margin-bottom: 28px; }
}

.auth-container {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;          /* mobile default */
}

/* form boxes (mobile-first) */
.auth-form-box { width: 100%; background: #fff; }
.auth-sign-up { display: none; }
.auth-container.right-panel-active .auth-sign-in { display: none; }
.auth-container.right-panel-active .auth-sign-up { display: block; }

.auth-form-box form {
  display: flex; flex-direction: column;
  padding: 30px 28px;
  text-align: center;
}
.auth-form-box h2 { font-size: 26px; margin: 0 0 8px; color: #ff5f6d; }
.auth-form-box p.sub { font-size: 13px; color: #7c8a9a; margin: 0 0 18px; }
.auth-form-box input, .auth-form-box select { margin: 8px 0; }
.auth-form-box .btn { margin-top: 16px; border-radius: 999px; padding: 12px 32px; }
.auth-form-box small { display: block; margin-top: 14px; color: #7c8a9a; }
.auth-form-box small a { color: #ff5f6d; cursor: pointer; font-weight: 600; }

/* overlay */
.auth-overlay-wrap {
  background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
  color: #fff;
  padding: 28px 24px;
  text-align: center;
}
.auth-overlay { display: block; }
.auth-overlay-panel {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
}
.auth-overlay-right { display: flex; }
.auth-container.right-panel-active .auth-overlay-right { display: none; }
.auth-container.right-panel-active .auth-overlay-left  { display: flex; }

.auth-overlay-panel h2 { font-size: 22px; margin: 0 0 10px; }
.auth-overlay-panel p  { font-size: 13.5px; line-height: 1.5; margin: 0 0 18px; opacity: .95; }
.auth-overlay-panel .ghost-btn {
  background: transparent; border: 2px solid #fff; color: #fff;
  border-radius: 999px; padding: 10px 30px; cursor: pointer;
  font-weight: 600; letter-spacing: .5px; font-size: 13px;
}
.auth-overlay-panel .ghost-btn:hover { background: rgba(255,255,255,.18); }

@media (min-width: 701px) {
  .auth-container { width: 800px; max-width: 100%; min-height: 560px; }

  .auth-form-box {
    position: absolute; top: 0; left: 0;
    width: 50%; height: 100%;
    transition: transform .6s ease-in-out, opacity .6s ease-in-out;
  }
  .auth-sign-in { z-index: 2; display: block; }
  .auth-sign-up { z-index: 1; display: block; opacity: 0; }
  .auth-form-box form { justify-content: center; height: 100%; padding: 0 50px; }

  .auth-container.right-panel-active .auth-sign-in {
    transform: translateX(100%); display: block;
  }
  .auth-container.right-panel-active .auth-sign-up {
    transform: translateX(100%); opacity: 1; z-index: 5;
    animation: showSignUp .6s; display: block;
  }
  @keyframes showSignUp {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100%  { opacity: 1; z-index: 5; }
  }

  .auth-overlay-wrap {
    position: absolute; top: 0; left: 50%;
    width: 50%; height: 100%;
    overflow: hidden;
    transition: transform .6s ease-in-out;
    z-index: 100;
    padding: 0;
  }
  .auth-overlay {
    position: relative; left: -100%;
    width: 200%; height: 100%;
    transform: translateX(0);
    transition: transform .6s ease-in-out;
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
  }
  .auth-overlay-panel {
    position: absolute; top: 0; height: 100%; width: 50%;
    display: flex !important;
    padding: 0 40px;
    text-align: center;
  }
  .auth-overlay-left  { left: 0;  transform: translateX(-20%); transition: transform .6s ease-in-out; }
  .auth-overlay-right { right: 0; transform: translateX(0);    transition: transform .6s ease-in-out; }
  .auth-overlay-panel h2 { font-size: 26px; }
  .auth-overlay-panel p  { font-size: 14px; }

  .auth-container.right-panel-active .auth-overlay-wrap  { transform: translateX(-100%); }
  .auth-container.right-panel-active .auth-overlay       { transform: translateX(50%); }
  .auth-container.right-panel-active .auth-overlay-left  { transform: translateX(0); }
  .auth-container.right-panel-active .auth-overlay-right { transform: translateX(20%); }
}

/* =========================================================
   App header (used on all signed-in pages)
   ========================================================= */
.app-header {
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.app-header .logo {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg,#ff5f6d,#ffc371);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.app-header nav { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: center; }
.app-header nav a {
  padding: 8px 14px; border-radius: 8px; color: #4a5560; font-weight: 500; font-size: 14px;
}
.app-header nav a:hover, .app-header nav a.active { background: #f5f7fb; color: #ff5f6d; }
.app-header .user-block { display: flex; align-items: center; gap: 10px; }
.app-header .user-block #user-greeting { font-weight: 600; }

.container { max-width: none; width: 100%; margin: 0; padding: 24px 32px; }

/* table */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.05); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eef0f3; font-size: 14px; vertical-align: middle; }
table.data th { background: #f5f7fb; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: #4a5560; }
table.data tr:last-child td { border-bottom: none; }
table.data code { font-family: 'Courier New', monospace; font-size: 12px; background: #f5f7fb; padding: 2px 6px; border-radius: 4px; }

hr { border: none; border-top: 1px solid #eef0f3; margin: 18px 0; }

/* visibility tag */
.visibility-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tag-private { background: #e2e6ec; color: #5a6877; }
.tag-shared  { background: #d6eaff; color: #2980b9; }

/* =========================================================
   Sub-tabs (used in Settings)
   ========================================================= */
.sub-tabs {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid #e1e6ee; margin: 18px 0;
}
.sub-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 10px 18px; border-radius: 8px 8px 0 0;
  font-weight: 600; font-size: 14px; color: #4a5560;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color .12s, border-color .12s, background .12s;
}
.sub-tab:hover { color: #ff5f6d; background: #f5f7fb; }
.sub-tab.active { color: #ff5f6d; border-bottom-color: #ff5f6d; }

.sub-tab-panel { display: none; }
.sub-tab-panel.active { display: block; }

/* =========================================================
   Export modal — status checkbox grid
   ========================================================= */
.export-status-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px;
  margin-top: 6px;
}
.check-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 0; font-weight: 500; font-size: 14px;
  cursor: pointer;
}
.check-line input[type=checkbox] { width: auto; margin: 0; }

/* ---------- app header (sticky variant) ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.app-header .logo {
  font-weight: 800;
  font-size: 18px;
  color: #ff5f6d;
  white-space: nowrap;
}
.app-header nav {
  display: flex;
  gap: 6px;
  /* Stretch to fill the space between logo and user-block, but
     center the nav links inside that space. */
  flex: 1;
  justify-content: center;
}
.app-header nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5560;
  transition: background .12s, color .12s;
}
.app-header nav a:hover  { background: #f5f7fb; color: #2c3e50; }
.app-header nav a.active { background: #ffe8ea; color: #ff5f6d; font-weight: 700; }
.app-header .user-block {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.container { max-width: none; width: 100%; margin: 0; padding: 24px 32px; }

/* =========================================================
   Center-aligned body pages (Settings & Profile per spec)
   The whole content body is constrained to a max-width and
   centered horizontally on the page (not just text-aligned).
   ========================================================= */
body.page-centered .container {
  text-align: center;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
body.page-centered .container > h1,
body.page-centered .container > h2,
body.page-centered .container > p {
  text-align: center;
}
/* Two-column profile grid: keep the cards a fixed comfortable
   width and center the grid as a whole. Internally each card
   stays left-aligned for readability. */
body.page-centered .profile-grid {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
body.page-centered .profile-grid > .modal {
  text-align: left;
}
/* Profile card heading is centered like the page */
body.page-centered .profile-grid > .modal h2 {
  text-align: center;
}
/* Settings sub-tab buttons row stays centered. */
body.page-centered .sub-tabs {
  justify-content: center;
}
/* Settings sub-tab panels: center the inner cards and constrain
   them so they sit nicely in the middle of the viewport instead
   of stretching edge-to-edge. Cards keep left-aligned text inside. */
body.page-centered .sub-tab-panel {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
body.page-centered .sub-tab-panel > .modal {
  margin-left: auto;
  margin-right: auto;
}
.notif-bell {
  position: relative;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1.5px solid #ffc371;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #d35400;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: bellPulse 2s infinite, bellShake 3s ease-in-out infinite;
  transform-origin: top center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.notif-bell:hover {
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(255, 152, 0, .35);
  animation-play-state: paused;
}
.notif-bell:active { transform: scale(.95); }
.notif-count {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  animation: countPop 1.6s ease-in-out infinite;
}
@keyframes bellPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,195,113,.5); }
  50%       { box-shadow: 0 0 0 10px rgba(255,195,113,0); }
}
@keyframes bellShake {
  0%, 92%, 100% { transform: rotate(0deg); }
  93%           { transform: rotate(-12deg); }
  94%           { transform: rotate(10deg); }
  95%           { transform: rotate(-8deg); }
  96%           { transform: rotate(6deg); }
  97%           { transform: rotate(-4deg); }
  98%           { transform: rotate(2deg); }
  99%           { transform: rotate(0deg); }
}
@keyframes countPop {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

/* ---------- sub-tabs (centered) ---------- */
.sub-tabs {
  display: flex;
  justify-content: center;       /* center the tab buttons horizontally */
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 2px solid #e8ecf0;
  padding-bottom: 0;
}
.sub-tab {
  padding: 9px 18px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #7c8a9a;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  transition: color .15s, border-color .15s;
}
.sub-tab:hover  { color: #ff5f6d; }
.sub-tab.active { color: #ff5f6d; border-bottom-color: #ff5f6d; }
.sub-tab-panel  { display: none; }
.sub-tab-panel.active {
  display: block;
  animation: subTabFade .35s ease;
}
@keyframes subTabFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Center the content under each sub-tab as well (panels) */
.sub-tab-panel > .modal {
  margin-left: auto;
  margin-right: auto;
}
/* All settings subtab content is center-aligned per spec.
   Headings, paragraphs, inputs, and labels all line up centered.
   `display:flex; flex-direction:column` lets us center inputs that
   are normally `width:100%` by capping them with max-width. */
.sub-tab-panel > .modal {
  text-align: center;
}
.sub-tab-panel > .modal h2,
.sub-tab-panel > .modal p,
.sub-tab-panel > .modal label,
.sub-tab-panel > .modal .muted {
  text-align: center;
}
.sub-tab-panel > .modal label {
  /* Label is a block — center it without shifting the inputs. */
  text-align: center;
}
.sub-tab-panel > .modal input[type=text],
.sub-tab-panel > .modal input[type=password],
.sub-tab-panel > .modal input[type=email],
.sub-tab-panel > .modal input[type=color],
.sub-tab-panel > .modal select,
.sub-tab-panel > .modal textarea {
  margin-left: auto;
  margin-right: auto;
  display: block;
}
.sub-tab-panel > .modal .modal-actions {
  justify-content: center;
}
/* Rows that put an input next to a button (e.g. "Add a department")
   stay flex but become center-justified instead of left-justified. */
.sub-tab-panel > .modal > div[style*="display:flex"],
.sub-tab-panel > .modal > div[style*="display: flex"] {
  justify-content: center;
}
/* Lists/tables inside subtabs stay left-aligned internally but are
   horizontally centered as a block via auto margins. */
.sub-tab-panel > .modal > ul,
.sub-tab-panel > .modal > ol,
.sub-tab-panel > .modal > table,
.sub-tab-panel > .modal > .dept-grid,
.sub-tab-panel > .modal > #dept-list-wrap,
.sub-tab-panel > .modal > #gd-list-wrap,
.sub-tab-panel > .modal > #roles-table-wrap,
.sub-tab-panel > .modal > #status-list {
  margin-left: auto;
  margin-right: auto;
  text-align: left;        /* keep table/list rows readable */
}
.sub-tab-panel > .modal .dept-grid {
  justify-content: center;
}

/* ---------- data table ---------- */
.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data th, .data td { padding: 10px 12px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
.data th { font-weight: 700; background: #f8fafc; color: #4a5560; }
.data tr:last-child td { border-bottom: none; }
.data tr:hover td { background: #fafbfc; }
.data select { margin-top: 0; width: auto; font-size: 13px; padding: 6px 8px; }

/* ERM → ERM Ticketing System title on auth pages */
.erm-title { font-family: 'Segoe UI', sans-serif; }

/* =========================================================
   Beautiful icon buttons (used for Department edit/delete and
   anywhere we want a polished icon-only action)
   ========================================================= */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 16px;
  background: #fff;
  color: #4a5560;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: transform .25s cubic-bezier(.18,.89,.32,1.28),
              box-shadow .2s ease,
              background .2s ease,
              color .2s ease;
  position: relative;
  overflow: hidden;
}
.icon-btn::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0);
  transition: transform .35s ease, opacity .25s ease;
  z-index: 0;
}
.icon-btn > * { position: relative; z-index: 1; }
.icon-btn:hover {
  transform: translateY(-2px) scale(1.1) rotate(-4deg);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.icon-btn:active {
  transform: translateY(0) scale(.94);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.icon-btn:active::before {
  transform: scale(2.2);
  opacity: .15;
}
.icon-btn-edit {
  background: linear-gradient(135deg,#e3f2fd,#bbdefb);
  color: #1565c0;
}
.icon-btn-edit:hover {
  background: linear-gradient(135deg,#42a5f5,#1976d2);
  color: #fff;
}
.icon-btn-delete {
  background: linear-gradient(135deg,#ffebee,#ffcdd2);
  color: #c62828;
}
.icon-btn-delete:hover {
  background: linear-gradient(135deg,#ef5350,#c62828);
  color: #fff;
}
.icon-btn svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   Roles table — page row checkboxes
   ========================================================= */
.role-page-select-all {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  color: #4a5560;
}
.role-page-select-all input[type=checkbox] {
  width: 16px; height: 16px;
  margin: 0;
  accent-color: #ff5f6d;
}

/* =========================================================
   Inline content panels
   The .modal class is reused as in-page content cards on
   settings.html and profile.html. When used that way (i.e.
   NOT inside a .modal-overlay popup), the card should fill
   the available container width instead of being capped at
   the popup max-width of 520px. Real popup modals — which
   live inside .modal-overlay — keep their original behavior.
   ========================================================= */
.sub-tab-panel > .modal,
.container       > .modal {
  max-width: none;
  max-height: none;
  overflow: visible;
}

/* =========================================================
   Action button group on Active & Other Users
   - Reset Password and Delete are visually separated and
     each has its own polished animation.
   ========================================================= */
.user-action-cell {
  display: flex;
  align-items: center;
  gap: 14px;            /* visible separation between the two */
  flex-wrap: wrap;
}
.user-action-divider {
  display: inline-block;
  width: 1px; height: 22px;
  background: #e1e6ee;
}
.btn-reset-pass {
  position: relative;
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  color: #b76e00;
  border: 1.5px solid #ffd180;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition:
    transform .25s cubic-bezier(.18,.89,.32,1.28),
    box-shadow .25s ease, background .25s ease;
  overflow: hidden;
}
.btn-reset-pass::before {
  content: '🔑';
  font-size: 14px;
  transition: transform .35s ease;
}
.btn-reset-pass:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 22px rgba(255, 167, 38, .35);
  background: linear-gradient(135deg, #ffd180, #ffab40);
  color: #fff;
}
.btn-reset-pass:hover::before { transform: rotate(-22deg) scale(1.18); }
.btn-reset-pass:active { transform: scale(.95); }

.btn-delete-user {
  position: relative;
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #c62828;
  border: 1.5px solid #ef9a9a;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition:
    transform .25s cubic-bezier(.18,.89,.32,1.28),
    box-shadow .25s ease, background .25s ease;
  overflow: hidden;
}
.btn-delete-user::before {
  content: '🗑';
  font-size: 14px;
  transition: transform .35s ease;
}
.btn-delete-user:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 22px rgba(239, 83, 80, .4);
  background: linear-gradient(135deg, #ef5350, #c62828);
  color: #fff;
}
.btn-delete-user:hover::before { transform: rotate(12deg) scale(1.2); }
.btn-delete-user:active { transform: scale(.95); }

/* =========================================================
   "Select" toggle button on the project page header
   Replaces the old "Delete Selected" button.
   ========================================================= */
.btn-select-toggle {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-select-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(33,150,243,.35);
  background: linear-gradient(135deg, #90caf9, #42a5f5);
  color: #fff;
}
.btn-select-toggle.active {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 95, 109, .4);
}
.btn-select-toggle.active:hover {
  background: linear-gradient(135deg, #ff8a80, #ffb74d);
}
