/* Stayi Owner Portal Design System */

.owner-shell {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}

.owner-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 17rem;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

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

@media (min-width: 1024px) {
  .owner-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
  }
}

.owner-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.owner-sidebar-backdrop.is-open {
  display: block;
}

.owner-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem 1rem;
}

.owner-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: 0 10px 25px -10px rgba(99, 102, 241, 0.8);
}

.owner-sidebar-title {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.owner-sidebar-subtitle {
  color: #94a3b8;
  font-size: 0.75rem;
}

.owner-nav {
  padding: 0.75rem;
}

.owner-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 0.25rem;
  border-radius: 0.75rem;
  color: #cbd5e1;
  font-size: 0.925rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.owner-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.owner-nav-link.is-active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.25);
}

.owner-nav-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.owner-nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.owner-sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.owner-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.owner-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

.owner-content {
  flex: 1;
  padding: 1rem;
}

@media (min-width: 768px) {
  .owner-content {
    padding: 1.5rem;
  }
}

@media (min-width: 1280px) {
  .owner-content {
    padding: 2rem 2.25rem;
  }
}

.owner-page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .owner-page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.owner-page-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.owner-page-description {
  margin-top: 0.375rem;
  color: #64748b;
  font-size: 0.95rem;
}

.owner-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.owner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.owner-btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.owner-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 10px 25px -12px rgba(79, 70, 229, 0.8);
}

.owner-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(79, 70, 229, 0.9);
}

.owner-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.owner-btn-secondary:hover {
  background: #f8fafc;
}

.owner-btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.owner-btn-danger:hover {
  background: #fef2f2;
}

.owner-btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid transparent;
}

.owner-btn-ghost:hover {
  background: #f1f5f9;
}

.owner-btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 0.65rem;
}

.owner-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.owner-card:hover {
  box-shadow: 0 10px 30px -20px rgba(15, 23, 42, 0.25);
}

.owner-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .owner-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .owner-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.owner-kpi-card {
  padding: 1.25rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.owner-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -24px rgba(15, 23, 42, 0.35);
}

.owner-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.owner-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
}

.owner-kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.owner-kpi-value {
  margin-top: 0.75rem;
  font-size: 1.875rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.owner-kpi-meta {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.owner-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
}

.owner-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
  background: #fafbfd;
}

.owner-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.owner-panel-body {
  padding: 1rem 1.25rem;
}

.owner-table-wrap {
  overflow-x: auto;
}

.owner-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.owner-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.owner-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  vertical-align: middle;
}

.owner-table tbody tr {
  transition: background-color 0.15s ease;
}

.owner-table tbody tr:hover {
  background: #f8fafc;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.owner-badge-success {
  background: #ecfdf5;
  color: #047857;
}

.owner-badge-warning {
  background: #fffbeb;
  color: #b45309;
}

.owner-badge-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.owner-badge-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.owner-badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

.owner-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.owner-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.owner-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.owner-empty-text {
  margin-top: 0.5rem;
  color: #64748b;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.owner-form-card {
  max-width: 48rem;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .owner-form-card {
    padding: 2rem;
  }
}

.owner-form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.owner-form-error {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #dc2626;
}

.owner-filter-panel {
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.owner-alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.owner-alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.owner-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.owner-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.owner-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.owner-modal-overlay {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.owner-modal-panel {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.owner-quick-actions {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .owner-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.owner-quick-action {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 0.2s ease;
}

.owner-quick-action:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .owner-sidebar,
  .owner-card,
  .owner-kpi-card,
  .owner-btn,
  .owner-table tbody tr,
  .owner-quick-action {
    transition: none;
  }

  .owner-kpi-card:hover,
  .owner-quick-action:hover,
  .owner-btn-primary:hover {
    transform: none;
  }
}
