html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

:root {
  --ahize-dark: #0f172a;
  --ahize-blue: #2563eb;
  --ahize-light: #f8fafc;
  --ahize-muted: #64748b;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #ffffff;
  color: #111827;
}

.site-header .navbar {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-account-menu {
  font-size: 1.1rem;
  padding: 6px 12px;
}

.nav-account-dropdown {
  min-width: 180px;
  border-radius: 12px;
  padding: 8px;
}

.nav-account-dropdown .dropdown-item {
  border-radius: 8px;
}

.hero-section {
  padding: 90px 0 70px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 55%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 45%),
    #f8fafc;
}

.hero-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
  padding: 24px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

.hero-card-body {
  display: grid;
  gap: 14px;
}

.hero-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ahize-light);
  font-size: 0.95rem;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--ahize-light);
}

.section-title h2 {
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title p {
  color: var(--ahize-muted);
  max-width: 650px;
}

.feature-card {
  background: #ffffff;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  height: 100%;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.feature-card h5 {
  font-weight: 600;
  margin-bottom: 12px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.timeline li {
  padding-left: 24px;
  margin-bottom: 16px;
  position: relative;
  color: var(--ahize-muted);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ahize-blue);
}

.info-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: 18px;
  padding: 24px;
}

.info-card code {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 10px;
  color: #e2e8f0;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 32px;
  border-radius: 20px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.2);
}

.site-footer {
  padding: 24px 0;
  background: #0f172a;
  color: #e2e8f0;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
}

.auth-section {
  padding: 90px 0;
  background: #f8fafc;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.auth-header h2 {
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  color: var(--ahize-muted);
}

.auth-footer a {
  color: var(--ahize-blue);
  text-decoration: none;
  margin-left: 6px;
  font-weight: 600;
}

.form-check-label a {
  color: var(--ahize-blue);
  text-decoration: none;
}

.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: 520px;
  position: relative;
}

.account-sidebar {
  background: #0f172a;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #e2e8f0;
  transition: width 0.2s ease;
}

.account-sidebar.is-collapsed {
  width: 72px;
}

.account-toggle {
  align-self: flex-start;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-tab {
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  transition: background 0.2s ease, transform 0.2s ease;
}

.account-tab.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(14, 165, 233, 0.2));
  color: #fff;
}

.account-tab:hover {
  transform: translateX(2px);
}

.account-sidebar.is-collapsed .tab-text {
  display: none;
}

.account-sidebar.is-collapsed .account-tab {
  justify-content: center;
}

.account-sidebar.is-collapsed .logout-text {
  display: none;
}

.account-sidebar.is-collapsed .logout-icon {
  display: inline-flex;
}

.logout-icon {
  margin-right: 8px;
}

.account-content {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.account-mobile-bar {
  display: none;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
}

.device-item,
.server-item,
.room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.device-item:last-child,
.server-item:last-child,
.room-item:last-child {
  border-bottom: none;
}

.section-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
}

.account-info-list {
  display: grid;
  gap: 12px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
}

.account-row .label {
  font-size: 0.85rem;
  color: var(--ahize-muted);
}

.account-row .value {
  font-weight: 600;
}

.account-sidebar.is-collapsed .account-toggle {
  width: 100%;
}

.server-hub {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: start;
}

.server-rail {
  background: #0f172a;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #e2e8f0;
  min-height: 520px;
}

.server-rail-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-rail-action {
  border-radius: 12px;
  font-size: 0.85rem;
}

.server-rail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.server-rail-button {
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.server-rail-button:hover {
  background: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.server-rail-button.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(14, 165, 233, 0.2));
}

.server-rail-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #e2e8f0;
}

.server-panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.server-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.server-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.server-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.server-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  min-height: 220px;
}

.server-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.server-list {
  display: grid;
  gap: 10px;
}

.server-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.server-list-column {
  flex-direction: column;
  align-items: flex-start;
}

.server-empty {
  color: var(--ahize-muted);
  font-size: 0.9rem;
  padding: 12px;
}

.swal2-checkbox-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  text-align: left;
}

.swal2-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
}

.swal2-checkbox-input {
  margin-top: 4px;
}

.swal2-checkbox-title {
  font-weight: 600;
}

.swal2-checkbox-desc {
  display: block;
  color: var(--ahize-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.swal2-checkbox-text {
  display: flex;
  flex-direction: column;
}

@media (max-width: 992px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-sidebar {
    position: absolute;
    top: 54px;
    right: 0;
    width: 220px;
    display: none;
    z-index: 10;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  }
  .account-sidebar.is-mobile-open {
    display: flex;
  }
  .account-toggle {
    display: none;
  }
  .account-mobile-bar {
    display: flex;
  }

  .server-hub {
    grid-template-columns: 1fr;
  }

  .server-rail {
    min-height: auto;
  }

  .server-rail-header {
    flex-direction: row;
  }

  .server-rail-action {
    width: auto;
  }

  .server-rail-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .server-panel-grid {
    grid-template-columns: 1fr;
  }
}

#serverList,
#roomList,
#roleList,
#memberList {
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 1200px) {
  .server-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .download-card {
    flex-direction: column;
    align-items: flex-start;
  }
}