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

:root {
  --surface:      rgba(255,255,255,0.55);

  --border:       rgba(255,255,255,0.7);
  --border2:      rgba(71,204,131,0.35);

  --text:         #2a3d35;
  --text-soft:    #3e6655;
  --muted:        #89a898;

  --accent:       #47cc83;
  --accent2:      #39ba74;

  --green:        #47cc83;
  --red:          #e05c7a;
  --amber:        #f0b840;


  --radius:       18px;
  --radius-sm:    12px;
  --font-head:    'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;

  --glass-blur:   blur(16px) saturate(1.2);
}

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at 20% 0%,   rgba(184,240,216,0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%,  rgba(160,223,245,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #eaf8f2 0%, #f4fcf8 45%, #edf7fc 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}


.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(ellipse 600px 300px at 15% 85%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 400px 250px at 85% 20%, rgba(180,240,255,0.4) 0%, transparent 70%);
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(255,255,255,0.52);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 4px 0 30px rgba(71,204,131,0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #90ffca, var(--accent));
  box-shadow: 0 0 0 3px rgba(71,204,131,0.25), 0 0 14px var(--accent-glow);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.stats {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.stat-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 12px rgba(71,204,131,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(71,204,131,0.4);
  background: rgba(255,255,255,0.5);
  color: var(--text-soft);
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.content {
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.content-header h1 {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.content-header h1 em {
  font-style: normal;
  color: var(--accent2);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s, box-shadow 0.3s;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-dot.offline {
  background: var(--red);
}

.form-card {
  background: rgba(255,255,255,0.58);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 24px rgba(71,204,131,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.75rem 1.1rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(71,204,131,0.3);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.form-row input[type="text"]   { flex: 2; min-width: 180px; }
.form-row input[type="number"] { flex: 1; min-width: 120px; }
.form-row input::placeholder   { color: var(--muted); }
.form-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(71,204,131,0.22), inset 0 2px 4px rgba(0,0,0,0.04);
}

.form-row button {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(180deg, #6ddfa3 0%, #37bb73 55%, #2aab66 100%);
  color: #fff;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0,60,30,0.3);
  box-shadow:
    0 4px 14px rgba(71,204,131,0.4),
    0 1px 0 rgba(255,255,255,0.3) inset;
  transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.form-row button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 55%);
  border-radius: inherit;
  pointer-events: none;
}

.form-row button:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(71,204,131,0.55), 0 1px 0 rgba(255,255,255,0.3) inset;
}
.form-row button:active { transform: scale(0.97); }

.error-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(240,107,107,0.12);
  border: 1px solid rgba(240,107,107,0.3);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: var(--red);
}

.error-bar.visible { display: flex; }

.error-close {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  opacity: 0.7;
}
.error-close:hover { opacity: 1; }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
}

th {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.9rem 1.25rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  animation: rowIn 0.25s ease both;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

td {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

td:first-child {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--muted);
  width: 48px;
}

.item-price {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--green);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  gap: 6px;
}

.btn-edit, .btn-delete {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-edit {
  background: rgba(240,168,50,0.1);
  color: var(--amber);
  border-color: rgba(240,168,50,0.2);
}
.btn-edit:hover {
  background: rgba(240,168,50,0.2);
  border-color: var(--amber);
}

.btn-delete {
  background: rgba(240,107,107,0.1);
  color: var(--red);
  border-color: rgba(240,107,107,0.2);
}
.btn-delete:hover {
  background: rgba(240,107,107,0.2);
  border-color: var(--red);
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state.visible { display: flex; }

.empty-icon {
  font-size: 2rem;
  opacity: 0.3;
}

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; }
  .content { padding: 1.5rem; }
}