/* ========================================
   CORE VARIABLES & GLOBAL (dark theme como profile)
   ======================================== */

:root {
  --sidebar-bg: #0d1117;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(99, 102, 241, 0.15);
  --sidebar-accent: #6366f1;
  --sidebar-text: #e6edf3;
  --sidebar-text-muted: #8b949e;
  --main-bg: #0a0e14;
  --main-surface: #131920;
  --card-bg: rgba(19, 25, 32, 0.8);
  --card-border: rgba(255, 255, 255, 0.06);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --input-bg: rgba(22, 27, 34, 0.8);
  --input-border: rgba(255, 255, 255, 0.08);
  --input-focus: rgba(99, 102, 241, 0.5);
  --btn-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --btn-primary-hover: linear-gradient(135deg, #5558e3 0%, #7c3aed 100%);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #22c55e;
  --admin: #f59e0b;
  --user: #3b82f6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--main-bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

hr {
  margin: 8px 12.75px;
  border: 0.5px solid #1b7a80;
  width: 90%;
  height: 1px;
}

.inventory-header {
  display: flex;
  margin-bottom: 2rem;
  flex-direction: column;
  align-items: center;
}

.inventory-header h1 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inventory-header h1 ion-icon {
  font-size: 2.1rem;
  color: var(--sidebar-accent);
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.inventory-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  padding: 0;
}

.inventory-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.6rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.inventory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #22c55e);
}

.inventory-card:hover {
  /*transform: translateY(-8px);*/
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  border-color: var(--sidebar-accent);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  gap: 12px;
}

.card-title-group {
    flex: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-word;
}

.device-id {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'Monaco', 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.card-content {
  flex: 1;
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--input-bg);
  border-radius: 10px;
  border-left: 3px solid var(--sidebar-accent);
  transition: all 0.2s ease;
}

.info-row:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(34, 197, 94, 0.18));
}

.info-row ion-icon {
  font-size: 20px;
  color: var(--sidebar-accent);
  flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Monaco', 'Courier New', monospace;
}

.card-footer {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--btn-primary);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
}

.btn-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--sidebar-accent);
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-settings:hover {
  background: var(--sidebar-accent);
  color: white;
}

/* Empty State */
.empty-state {
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 60px 20px;
  background: #ffffff2b;
  border-radius: 16px;
  border: 1px dashed var(--card-border);
}

.empty-state ion-icon {
  font-size: 4rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .inventory-list {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    
  }

  .inventory-header h1 {
    font-size: 1.6rem;
  }

  .card-footer {
    flex-direction: column;
  }

  .btn {
    padding: 0.85rem 1.25rem;
  }

  .btn-settings {
    width: 100%;
  }
}


/* ==========================
   LOCK OVERLAY (Device bloqueado)
========================== */

.inventory-card {
  position: relative;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10;
}

.lock-box {
  text-align: center;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(19, 25, 32, 0.75);
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
  max-width: 320px;
}

.lock-box ion-icon {
  font-size: 2.2rem;
  color: var(--danger);
  margin-bottom: 10px;
}

.lock-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.lock-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.35;
}

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