/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f8;
  color: #1a1a2e;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 32px;
  width: 100%;
  max-width: 380px;
}

.logo {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #14532d;
  margin-bottom: 16px;
}

.card h1 {
  font-size: 22px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  color: #555;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid #d5d8df;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #4f46e5;
}

.field-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.field-hint {
  font-size: 12px;
  color: #888;
}

.links-editor {
  margin-bottom: 16px;
}

.links-editor ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.links-editor li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.links-add {
  display: flex;
  gap: 8px;
}

.btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: #4338ca;
}

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

.btn-ghost {
  background: transparent;
  color: #4f46e5;
  border: 1px solid #4f46e5;
  width: auto;
  padding: 9px 18px;
}

.btn-ghost:hover {
  background: #eef2ff;
}

.error {
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ===== App shell ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  height: 60px;
  background: #14532d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.app-header-email {
  font-size: 14px;
  opacity: 0.9;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.app-body {
  flex: 1 1;
  display: flex;
}

.app-sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1;
}

.sidebar-link {
  padding: 10px 12px;
  border-radius: 8px;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-link:hover {
  background: #eef2ff;
}

.sidebar-logout {
  margin-top: auto;
}

.sidebar-backdrop {
  display: none;
}

.app-main {
  flex: 1 1;
  padding: 24px;
}

.page-title {
  font-size: 22px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.widget {
  max-width: none;
}

.widget h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.widget p {
  font-size: 14px;
  color: #555;
}

/* ===== Instances CRUD ===== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-inline {
  width: auto;
  padding: 9px 18px;
}

.btn-sm {
  width: auto;
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  width: auto;
  padding: 6px;
  background: transparent;
  border: 1px solid #d5d8df;
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: #eef2ff;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

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

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
}

.data-table th {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.data-table tr.clickable {
  cursor: pointer;
}

.data-table tr.clickable:hover {
  background: #f7f8fa;
}

.detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-gap: 8px 16px;
  gap: 8px 16px;
  margin: 12px 0 20px;
}

.detail-grid dt {
  color: #777;
}

.detail-links {
  list-style: none;
  padding: 0;
  margin: 8px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== Instance auth (Green API) ===== */
.instance-auth {
  margin-bottom: 20px;
  padding: 16px;
  background: #f7f8fa;
  border-radius: 8px;
}

.auth-muted {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.auth-hint {
  font-size: 12px;
  color: #888;
  margin-top: 12px;
  line-height: 1.4;
}

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

.auth-header-actions {
  flex-shrink: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.status-chip--ok {
  background: #dcfce7;
  color: #15803d;
}

.status-chip--muted {
  background: #f3f4f6;
  color: #4b5563;
}

.status-chip--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-chip--warn {
  background: #ffedd5;
  color: #c2410c;
}

.status-chip--danger {
  background: #fee2e2;
  color: #dc2626;
}

.status-chip--loading {
  background: #eef2ff;
  color: #6366f1;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  padding: 8px 14px;
  border: 1px solid #d5d8df;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #1a1a2e;
}

.auth-tab--active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}

.auth-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.auth-qr img {
  max-width: 256px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.auth-code {
  font-size: 28px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.08em;
  margin: 12px 0 4px;
  color: #14532d;
}

.auth-phone .btn-inline {
  margin-top: 4px;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 50;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
  }
}

