/* =========================================================
   UnderHost Software Mirror - Page CSS
   ========================================================= */

/* 1. Variables */
:root {
  --uh-primary: #00D4FF;
  --uh-primary-dark: #0091D6;

  --uh-secondary: #0091D6;
  --uh-secondary-dark: #0078B8;

  --uh-accent: #64748B;
  --uh-accent-light: #94A3B8;
  --uh-accent-dark: #334155;

  --uh-surface: #FFFFFF;
  --uh-surface-soft: #F8F9FA;
  --uh-border: #E5E7EB;

  --uh-dark-base: #0A1220;
  --uh-dark-mid: #0D1B30;
  --uh-dark-panel: #0F2040;
  --uh-dark-deep: #071428;

  --uh-border-primary: rgba(0, 212, 255, 0.20);
  --uh-border-secondary: rgba(0, 145, 214, 0.18);

  --uh-gradient-horizontal: linear-gradient(90deg, #00D4FF, #0091D6);
  --uh-gradient-primary: linear-gradient(135deg, #0A1220 0%, #0D1B30 40%, #0F2040 70%, #071428 100%);

  --uh-shadow-md: 0 4px 16px rgba(0, 145, 214, 0.35);
  --uh-shadow-lg: 0 6px 22px rgba(0, 145, 214, 0.52);
  --uh-shadow-glow: 0 0 30px rgba(0, 212, 255, 0.25);

  --uh-radius-sm: 8px;
  --uh-radius-md: 12px;
  --uh-radius-lg: 16px;
  --uh-radius-xl: 20px;

  --uh-container: 1200px;
  --underhost-primary: var(--uh-primary);
  --underhost-dark: var(--uh-dark-base);
  --underhost-border: var(--uh-border);
}

/* 2. Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: var(--uh-secondary);
}

/* 3. Container */
.uh-container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

/* 4. Header / Navigation */
.uh-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.uh-site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 145, 214, 0.12);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.10);
}

.uh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.uh-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.uh-logo-img {
  display: block;
  height: 48px;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.uh-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.uh-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: #4B5563;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--uh-radius-sm);
  transition: color 160ms ease, background 160ms ease;
  text-decoration: none;
}

.uh-nav-link:hover {
  color: #061637;
  background: rgba(0, 145, 214, 0.07);
}

.uh-nav-link i {
  font-size: 13px;
  opacity: 0.8;
}

.uh-nav-cta {
  margin-left: 8px;
}

/* 5. Buttons */
.uh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--uh-radius-md);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.uh-btn:focus-visible {
  outline: 3px solid rgba(0, 212, 255, 0.35);
  outline-offset: 3px;
}

.uh-btn-primary {
  background: var(--uh-gradient-horizontal);
  color: #fff;
  box-shadow: var(--uh-shadow-md);
}

.uh-btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--uh-shadow-lg);
}

.uh-btn-secondary {
  background: #fff;
  color: #061637;
  border: 1px solid rgba(0, 145, 214, 0.22);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.uh-btn-secondary:hover {
  color: #061637;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.uh-btn-danger {
  background: #E11D48;
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.22);
}

.uh-btn-danger:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28);
}

/* 6. Mobile Toggle */
.uh-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--uh-radius-sm);
  background: rgba(0, 145, 214, 0.06);
  color: #061637;
  font-size: 18px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.uh-mobile-toggle:hover {
  background: rgba(0, 145, 214, 0.10);
  border-color: rgba(0, 212, 255, 0.35);
}

/* 7. Mobile Nav */
.uh-mobile-nav {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  padding: 12px 0 20px;
}

.uh-mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: #4B5563;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  transition: color 160ms ease;
}

.uh-mobile-link:hover {
  color: #061637;
}

.uh-mobile-link i {
  font-size: 14px;
  width: 20px;
  opacity: 0.8;
}

.uh-mobile-cta {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

/* 8. Hero Section */
.uh-hero-section {
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.10), rgba(255, 255, 255, 0) 36%),
    var(--uh-gradient-primary);
  color: #fff;
  padding: 76px 0 64px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.uh-hero-inner {
  max-width: 820px;
}

.uh-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.28);
  color: var(--uh-primary);
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.uh-hero-heading {
  font-family: Inter, Manrope, system-ui, sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  color: #fff;
  margin-bottom: 20px;
}

.uh-hero-desc {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 32px;
  max-width: 640px;
}

.uh-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.uh-hero-trust {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.uh-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.60);
}

.uh-trust-item i {
  color: var(--uh-primary);
  font-size: 14px;
}

/* 9. Section Divider */
.uh-section-divider {
  width: min(100% - 32px, 1200px);
  margin: 48px auto;
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.uh-section-divider-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.38),
    rgba(0, 145, 214, 0.26),
    transparent
  );
}

.uh-section-divider-icon {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.30));
}

/* 10. Mirror Main */
.uh-mirror-main {
  flex: 1;
  padding-bottom: 16px;
}

.uh-mirror-list-header {
  text-align: center;
  margin-bottom: 40px;
}

.uh-section-heading {
  font-family: Inter, Manrope, system-ui, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--uh-dark-base);
  margin-bottom: 12px;
}

.uh-section-subtext {
  font-size: 16px;
  color: var(--uh-accent);
  max-width: 580px;
  margin: 0 auto;
}

/* 11. Software List */
.uh-software-list {
  background: var(--uh-surface);
  border: 1px solid var(--uh-border);
  border-radius: var(--uh-radius-xl);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.uh-software-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--uh-border);
  transition: background 160ms ease;
}

.uh-software-item:last-child {
  border-bottom: none;
}

.uh-software-item:hover {
  background: rgba(0, 145, 214, 0.03);
}

.uh-software-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--uh-radius-md);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--uh-secondary);
  font-size: 18px;
}

.uh-software-info {
  flex: 1;
  min-width: 0;
}

.uh-software-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--uh-dark-base);
  margin-bottom: 4px;
  line-height: 1.3;
}

.uh-software-desc {
  font-size: 14px;
  color: var(--uh-accent);
  margin: 0;
  line-height: 1.5;
}

.uh-software-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.uh-software-extra-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uh-extra-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--uh-accent);
  padding: 6px 10px;
  border: 1px solid var(--uh-border);
  border-radius: var(--uh-radius-sm);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  text-decoration: none;
}

.uh-extra-link:hover {
  color: var(--uh-secondary);
  border-color: var(--uh-border-secondary);
  background: rgba(0, 145, 214, 0.04);
}

.uh-extra-link i {
  font-size: 11px;
}

/* 12. Empty State */
.uh-empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--uh-accent);
}

.uh-empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  display: block;
}

/* 13. Footer */
.uh-footer {
  background: var(--uh-gradient-primary);
  border-top: 1px solid rgba(0, 212, 255, 0.12);
  padding: 48px 0 28px;
  margin-top: auto;
}

.uh-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}

.uh-footer-brand {
  max-width: 280px;
}

.uh-footer-logo-img {
  display: block;
  width: auto;
  height: 46px;
  max-width: none;
  object-fit: contain;
  margin-bottom: 14px;
}

.uh-footer-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.6;
  margin: 0;
}

.uh-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
}

.uh-footer-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition: color 160ms ease;
}

.uh-footer-link:hover {
  color: var(--uh-primary);
}

.uh-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.uh-footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
}

.uh-footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.uh-footer-legal-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  transition: color 160ms ease;
}

.uh-footer-legal-link:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* 14. Mirror Admin */
.uh-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--uh-gradient-primary);
}

.login-wrap {
  width: min(100%, 420px);
  padding: 40px 36px;
  background: #fff;
  border: 1px solid rgba(0, 145, 214, 0.12);
  border-radius: var(--uh-radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30);
}

.login-logo {
  margin: 0 auto 24px;
}

.login-title {
  margin: 0 0 6px;
  color: var(--uh-dark-base);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.login-sub {
  margin: 0 0 28px;
  color: var(--uh-accent);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: var(--uh-radius-sm);
  background: rgba(225, 29, 72, 0.10);
  color: #BE123C;
  font-size: 13px;
  font-weight: 700;
}

.uh-admin-body {
  background: #fff;
}

.uh-admin-hero {
  padding: 64px 0 52px;
}

.uh-admin-main {
  padding: 52px 0 70px;
}

.underhost-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  padding: 14px 0;
}

.underhost-nav .container {
  width: min(100% - 32px, 1200px);
  max-width: 1200px;
  padding-inline: 0;
}

.underhost-nav .navbar-brand {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.mirror-admin-logo,
.login-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

.mirror-admin-logo {
  height: 54px;
  max-width: 260px;
}

.login-logo {
  height: 44px;
  max-width: 220px;
}

.admin-container {
  width: min(100% - 32px, 1200px);
  max-width: 1200px;
  margin: 40px auto 64px;
  padding: 0;
}

.admin-card-feature {
  margin-bottom: 46px;
}

.admin-card-heading,
.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-card-heading {
  margin-bottom: 22px;
}

.admin-section-heading {
  margin-bottom: 22px;
}

.admin-section-heading p {
  max-width: 540px;
  margin: 0;
  color: var(--uh-accent);
  font-size: 14px;
  line-height: 1.6;
}

.admin-pill {
  margin-bottom: 12px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--uh-border);
}

.admin-header h1,
.admin-container h1,
.admin-container h2 {
  color: var(--uh-dark-base);
  letter-spacing: 0;
}

.admin-header h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
}

.admin-container h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 18px;
}

.admin-card,
.software-card {
  background: #fff;
  border: 1px solid var(--uh-border);
  border-radius: var(--uh-radius-md);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.admin-card {
  padding: 24px;
  margin-bottom: 34px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.software-card {
  padding: 24px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: block;
  margin: 0;
  color: var(--uh-dark-base);
  font-size: 13px;
  font-weight: 700;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea,
.software-card input[type="text"],
.software-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--uh-border);
  border-radius: var(--uh-radius-sm);
  background: #fff;
  color: var(--uh-dark-base);
  font: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.admin-form textarea,
.software-card textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.software-card input:focus,
.software-card textarea:focus {
  border-color: var(--uh-secondary);
  box-shadow: 0 0 0 3px rgba(0, 145, 214, 0.12);
}

.form-actions,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.underhost-btn-primary,
.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--uh-radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.underhost-btn-primary {
  background: var(--uh-gradient-horizontal);
  box-shadow: var(--uh-shadow-md);
}

.btn-logout {
  background: #E11D48;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.22);
}

.underhost-btn-primary:hover,
.btn-logout:hover {
  color: #fff;
  transform: translateY(-1px);
}

.message {
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--uh-radius-sm);
  font-weight: 700;
}

.message.success {
  background: rgba(16, 185, 129, 0.10);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.message.error {
  background: rgba(225, 29, 72, 0.10);
  color: #BE123C;
  border: 1px solid rgba(225, 29, 72, 0.22);
}

/* 15. Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 212, 255, 0.45);
  outline-offset: 3px;
}

/* 16. Responsive */
@media (max-width: 768px) {
  .uh-nav-links {
    display: none;
  }

  .uh-mobile-toggle {
    display: flex;
  }

  .uh-hero-section {
    padding: 56px 0 44px;
  }

  .uh-hero-heading {
    font-size: 38px;
  }

  .uh-hero-desc {
    font-size: 16px;
  }

  .uh-section-heading {
    font-size: 28px;
  }

  .uh-hero-trust {
    gap: 16px;
  }

  .uh-software-item {
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 16px;
  }

  .uh-software-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
  }

  .uh-footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .uh-footer-brand {
    max-width: 100%;
  }

  .uh-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mirror-admin-logo {
    height: 42px;
    max-width: 210px;
  }

  .admin-container {
    margin-top: 28px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header h1 {
    font-size: 28px;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }

  .admin-card-heading,
  .admin-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .uh-logo-img {
    height: 38px;
    max-width: none;
  }

  .uh-section-divider {
    margin: 32px auto;
    gap: 12px;
  }

  .uh-hero-heading {
    font-size: 32px;
  }

  .uh-hero-actions .uh-btn {
    width: 100%;
  }

  .mirror-admin-logo {
    height: 36px;
    max-width: 180px;
  }

  .login-wrap {
    padding: 32px 24px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .software-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 17. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
