:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.field {
  width: 100%;
  border: 1px solid #cfd6e3;
  background: #ffffff;
  padding: 0.62rem 0.78rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field:focus {
  border-color: #172033;
  box-shadow: 0 0 0 3px rgba(23, 32, 51, 0.10);
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-plain,
.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  padding: 0.58rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
  white-space: nowrap;
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: #172033;
  border-color: #172033;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0f1727;
}

.btn-success {
  background: #14532d;
  border-color: #14532d;
  color: #ffffff;
}

.btn-success:hover {
  background: #0f3f22;
}

.btn-secondary {
  background: #ffffff;
  border-color: #cfd6e3;
  color: #172033;
}

.btn-secondary:hover {
  background: #f3f5f8;
}

.btn-danger {
  background: #ffffff;
  border-color: #fecaca;
  color: #b42318;
}

.btn-danger:hover {
  background: #fff1f1;
}

.btn-plain {
  background: transparent;
  color: #172033;
  border-color: transparent;
}

.btn-plain:hover {
  background: #f1f4f8;
}

.table-head {
  cursor: pointer;
  user-select: none;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.table-head:hover {
  background: #e9edf4;
}

.data-cell {
  padding: 0.8rem 1rem;
  vertical-align: middle;
  color: #172033;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
}

.section-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd6e3;
  background: #f8fafc;
  padding: 0.18rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #344054;
  margin: 0.08rem 0.16rem 0.08rem 0;
}

.status-granted {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-revoked,
.status-not_found {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.status-error {
  border-color: #fecaca;
  background: #fff1f1;
  color: #b42318;
}

.status-pending {
  border-color: #d7dde8;
  background: #f8fafc;
  color: #475467;
}

.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10) !important;
}

.notice-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.notice-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.notice-error {
  border-color: #fecaca;
  background: #fff1f1;
  color: #b42318;
}

@media (max-width: 900px) {
  .row-actions {
    min-width: 310px;
  }

  .field {
    min-width: 160px;
  }
}

.access-cell {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.access-list {
  display: grid;
  gap: 0.35rem;
  max-width: 340px;
}

.access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2rem;
  border: 1px solid #d7dde8;
  background: #f8fafc;
  color: #344054;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1rem;
}

.access-section {
  font-weight: 700;
  color: #172033;
}

.access-state {
  font-weight: 700;
  color: #667085;
}

.access-item.status-granted {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}

.access-item.status-granted .access-section,
.access-item.status-granted .access-state {
  color: #14532d;
}

.access-item.status-revoked,
.access-item.status-not_found,
.access-item.status-pending {
  border-color: #d7dde8;
  background: #f8fafc;
}

.access-item.status-error {
  border-color: #fecaca;
  background: #fff1f1;
}

.access-item.status-error .access-state {
  color: #b42318;
}

.actions-cell {
  position: relative;
  padding: 0.7rem 2.65rem 0.7rem 1rem;
  vertical-align: middle;
  color: #172033;
}

.action-panel {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 190px;
}

.grant-revoke-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #cfd6e3;
  background: #f3f5f8;
  min-height: 2.45rem;
}

.switch-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #344054;
  padding: 0.55rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1rem;
  transition: background 120ms ease, color 120ms ease;
}

.switch-option + .switch-option {
  border-left: 1px solid #cfd6e3;
}

.switch-option:hover:not(:disabled) {
  background: #ffffff;
}

.switch-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.grant-revoke-switch .grant-entry {
  color: #166534;
}

.grant-revoke-switch .revoke-entry {
  color: #b42318;
}

.grant-revoke-switch.granted .grant-entry {
  background: #dcfce7;
  color: #14532d;
}

.grant-revoke-switch.revoked .revoke-entry,
.grant-revoke-switch.pending .revoke-entry {
  background: #eef2f7;
  color: #475467;
}

.grant-revoke-switch.mixed .grant-entry,
.grant-revoke-switch.mixed .revoke-entry {
  background: #fffbeb;
}

.action-edit {
  width: 100%;
  min-height: 2.35rem;
}

.delete-icon {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: #98a2b3;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.delete-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.delete-icon:hover:not(:disabled) {
  color: #b42318;
  border-color: #fecaca;
  background: #fff1f1;
}

.delete-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .actions-cell {
    min-width: 250px;
  }

  .access-list {
    min-width: 210px;
  }
}

/* v7 table UI hardening: Drive Access chips and Grant/Revoke switch */
.v7-access-list{display:grid;gap:.45rem;min-width:230px;max-width:360px}
.v7-access-item{display:flex;align-items:center;justify-content:space-between;gap:.8rem;border:1px solid #d7dde8;background:#f6f7f9;color:#475467;padding:.42rem .62rem;font-size:.78rem;line-height:1rem;white-space:nowrap}
.v7-access-item .v7-section{font-weight:700;color:#344054}
.v7-access-item .v7-state{font-weight:700;text-transform:none;color:#667085}
.v7-access-item.is-granted{border-color:#86efac;background:#f0fdf4;color:#14532d}
.v7-access-item.is-granted .v7-section,.v7-access-item.is-granted .v7-state{color:#14532d}
.v7-access-item.is-error{border-color:#fecaca;background:#fff1f1;color:#b42318}
.v7-actions-cell{position:relative;padding:.72rem 2.7rem .72rem 1rem!important;vertical-align:middle!important;min-width:245px}
.v7-action-panel{display:flex;flex-direction:column;align-items:stretch;gap:.55rem;width:190px;max-width:100%}
.v7-switch{display:grid;grid-template-columns:1fr 1fr;border:1px solid #cfd6e3;background:#eef2f7;overflow:hidden;min-height:2.45rem}
.v7-switch button{display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:#344054;padding:.58rem .7rem;font-size:.83rem;font-weight:800;line-height:1rem;cursor:pointer;transition:background 120ms ease,color 120ms ease}
.v7-switch button+button{border-left:1px solid #cfd6e3}
.v7-switch button:hover:not(:disabled){background:#fff}
.v7-switch button:disabled{opacity:.55;cursor:not-allowed}
.v7-switch.is-granted .v7-grant{background:#dcfce7;color:#14532d}
.v7-switch.is-revoked .v7-revoke,.v7-switch.is-pending .v7-revoke{background:#f8fafc;color:#475467}
.v7-switch.is-mixed .v7-grant,.v7-switch.is-mixed .v7-revoke{background:#fffbeb;color:#92400e}
.v7-edit{width:100%;min-height:2.35rem}
.v7-trash{position:absolute;top:.5rem;right:.55rem;width:1.9rem;height:1.9rem;display:flex;align-items:center;justify-content:center;border:1px solid transparent;background:transparent;color:#98a2b3;cursor:pointer;transition:color 120ms ease,border-color 120ms ease,background 120ms ease}
.v7-trash svg{width:1.02rem;height:1.02rem;fill:currentColor}
.v7-trash:hover:not(:disabled){color:#b42318;border-color:#fecaca;background:#fff1f1}
.v7-trash:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:900px){.v7-actions-cell{min-width:250px}.v7-access-list{min-width:220px}}


.developer-footer {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 60;
  display: block;
  padding: 0;
  pointer-events: none;
}

.developer-badge {
  position: relative;
  overflow: hidden;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.96);
  color: #344054;
  padding: 0.46rem 0.72rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.developer-badge::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -65%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  transform: skewX(-18deg);
  animation: footerShine 6.4s ease-in-out infinite;
}

@keyframes footerShine {
  0%, 74% { left: -65%; }
  90%, 100% { left: 125%; }
}
