/* components.css — Buttons, Forms, Alerts */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,0.25);
  color: var(--text);
  font-weight: 650;
  transition: all .15s ease;
}

.btn:hover {
  border-color: var(--border-strong);
  background: rgba(2,6,23,0.35);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-color: rgba(34,197,94,0.35);
  color: #04110a;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444, #991b1b);
  border-color: rgba(239,68,68,0.4);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Slightly larger buttons for tables */
.btn-small {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 9px;
}

/* Forms */

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

label {
  font-size: 13px;
  font-weight: 650;
  color: rgba(229,231,235,0.9);
}

input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,0.25);
  color: var(--text);
}

input:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(56,189,248,0.55);
}

/* Alerts */

.alert {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

.alert.error {
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.35);
}

.alert.success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.35);
}
/* =====================================================
   MODAL SYSTEM — PROFESSIONAL CLEAN (SAFE)
===================================================== */
.hidden { display: none; }

.modal{
  position: fixed;
  inset: 0;
  display: none;                 /* ✅ default hidden */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
}

/* ✅ show modal ONLY when hidden class removed */
.modal:not(.hidden){
  display: flex;
}

.modal-card{
  width: min(560px, calc(100% - 32px));
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.96);
  padding: 18px;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-close{
  background: transparent;
  border: 0;
  color: #cbd5f5;
  font-size: 22px;
  cursor: pointer;
}

.modal-body .form-row{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin: 10px 0;
}

.modal-foot{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  margin-top: 14px;
}

.text-muted{ opacity: .7; }
/* =====================================================
   INVENTORY TABLE — CLEAN + COMPACT + SAFE
===================================================== */

/* 1️⃣ Enable horizontal scroll properly */
.table-wrap{
  overflow-x: auto;
  overflow-y: hidden;
}

/* 2️⃣ Prevent table compression */
.data-table{
  min-width: 880px; /* forces scroll if viewport smaller */
}

/* 3️⃣ Give last column breathing space */
.data-table td:last-child,
.data-table th:last-child {
  padding-right: 22px;
}

/* 5️⃣ Action button wrapper */
.inventory-actions{
  display:flex;
  justify-content:flex-end;
  gap: 6px;
}

/* 6️⃣ Compact buttons */
.inventory-actions .btn{
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  white-space: nowrap;
}

/* 7️⃣ Prevent hover shift */
.inventory-actions .btn:hover{
  transform: none;
  box-shadow: none;
}
/* Protected master admin badge */
.badge-protected {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  font-weight: 600;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  cursor: not-allowed;
}
/* =========================================
   KAOKAB STATUS BADGES (PROFESSIONAL)
========================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-disabled {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.badge-red{
  background: rgba(239,68,68,0.16);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fecaca;
}
/* ==========================================
   KAOKAB PROFESSIONAL DARK SELECT
========================================== */

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  color: #f1f5f9;

  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 12px;

  padding: 10px 40px 10px 14px;
  font-size: 14px;
  font-weight: 600;

  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover */
select:hover {
  border-color: rgba(249,115,22,0.6);
}

/* Focus */
select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.25);
}

/* Custom dropdown arrow */
select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23f97316' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Disabled */
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   OPTION STYLING (LIMITED BY BROWSER)
========================================== */

select option {
  background-color: #0f172a; /* dark slate */
  color: #f1f5f9;
  font-weight: 500;
}

/* Selected option highlight */
select option:checked {
  background-color: #1e293b;
  color: #f97316;
}

/* Hover inside dropdown (only works in some browsers) */
select option:hover {
  background-color: #1e293b;
  color: #f97316;
}
.edge-meta {
  margin-right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.edge-sep {
  margin: 0 10px;
  opacity: 0.5;
}

/* =================================================
   DOT SYSTEM — PROFESSIONAL 3D STYLE
================================================= */

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow:
    inset 0 0 2px rgba(255,255,255,0.5),
    0 0 3px rgba(0,0,0,0.4);
}

/* Status Colors */

.dot-green  { background: #22c55e; }
.dot-yellow { background: #facc15; }
.dot-grey   { background: #9ca3af; }
.dot-red    { background: #ef4444; }

/* Disabled — Fuchsia / Violet Professional */
.dot-dark {
  background: #d946ef; /* fuchsia-500 */
  box-shadow:
    inset 0 0 2px rgba(255,255,255,0.35),
    0 0 6px rgba(217,70,239,0.5);
}

/* =========================================
   MSP CUSTOMER ACTION BUTTONS — HD REFINED
========================================= */

/* container */

.table-actions{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:nowrap;
}

/* unified button style */

.table-actions .btn{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;

  min-width:82px;
  height:26px;

  padding:0 14px;

  font-size:13px;
  font-weight:700;
  letter-spacing:0.2px;

  border-radius:9px;

  border:1px solid rgba(148,163,184,0.22);
  background:rgba(15,23,42,0.35);

  white-space:nowrap;

  cursor:pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 1px 2px rgba(0,0,0,0.35);
}

/* hover */

.table-actions .btn:hover:not(:disabled){
  border-color:rgba(148,163,184,0.45);
  background:rgba(15,23,42,0.65);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 2px 6px rgba(0,0,0,0.45);

  transform:translateY(-1px);
}

/* active click */

.table-actions .btn:active:not(:disabled){
  transform:translateY(0);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.5);
}

/* disabled */

.table-actions .btn:disabled{
  opacity:0.45;
  cursor:not-allowed;
}

/* action dot */

.action-dot{
  width:8px;
  height:8px;
  border-radius:50%;

  flex-shrink:0;

  box-shadow:
    inset 0 0 3px rgba(255,255,255,0.5),
    0 0 3px rgba(0,0,0,0.45);
}

/* dot colors */

.dot-edit{
  background:#9ca3af;
}

.dot-invite{
  background:#22c55e;
}

.dot-disable{
  background:#f59e0b;
}

.dot-restore{
  background:#38bdf8;
}

.dot-delete{
  background:#ef4444;
}

/* =========================================
   ACTION COLUMN — PERFECT ALIGNMENT
========================================= */

th.actions{
  width:420px;
  text-align:left;
  padding-left:14px;
}

td.actions{
  width:420px;
  padding-left:14px;
}

/* actions layout */

.table-actions{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:90px;
  align-items:center;
  column-gap:8px;
}

/* button */

.table-actions .btn{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;

  width:90px;
  height:28px;

  padding:0 10px;

  font-size:13px;
  font-weight:700;
  letter-spacing:0.3px;

  border-radius:6px;

  border:1px solid rgba(255,255,255,0.10);
  background:#0f172a;
  color:#e5e7eb;

  cursor:pointer;

  transition:all .12s ease;

  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 2px 4px rgba(0,0,0,0.45);
}
.dot-license {
  background: #7c3aed; /* purple = premium/licensing feel */
}
/* Secondary button (for actions like Renew) */
.btn-secondary {
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.35);
  color: #e5e7eb;
}

.btn-secondary:hover {
  background: rgba(148,163,184,0.22);
  border-color: rgba(148,163,184,0.55);
}
