@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

@font-face {
  font-family: "ISConnect";
  src: url("img/font.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1b1f24;
  --ink-2: #2e343b;
  --accent: #db0b14;
  --accent-strong: #b10810;
  --accent-soft: rgba(219, 11, 20, 0.14);
  --brand-font: "ISConnect", "Fraunces", serif;
  --teal: #2d7a7b;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --line: #e6e6e6;
  --muted: #6b6f76;
  --shadow-soft: 0 12px 30px rgba(23, 24, 28, 0.08);
  --shadow-strong: 0 18px 45px rgba(23, 24, 28, 0.16);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --header-height: 80px;
  --sidebar-width: 260px;
}

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

html, body {
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.welcome-title,
.main-content h1,
.card-body h2,
.welcome-container .card h3,
.tab,
#iframeName {
  font-family: var(--brand-font);
  letter-spacing: 0.6px;
}

body:not(.login-page) {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(219, 11, 20, 0.08), transparent 55%),
    radial-gradient(900px 520px at 92% 10%, rgba(27, 31, 36, 0.08), transparent 60%),
    linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(219, 11, 20, 0.18);
  outline: none;
}

.hidden {
  display: none !important;
}

.error {
  color: #b42318;
  font-size: 13px;
  margin-top: 8px;
  min-height: 16px;
}

/* Loader */
.loader-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #15171a, #24272c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

.loader-circle {
  width: 70px;
  height: 70px;
  border: 6px solid rgba(255, 255, 255, 0.22);
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.loader-text {
  color: #f5f7fb;
  font-size: 16px;
  letter-spacing: 0.3px;
  font-weight: 500;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login */
body.login-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(600px 500px at 12% 8%, rgba(219, 11, 20, 0.1), transparent 60%),
    radial-gradient(700px 520px at 90% 0%, rgba(27, 31, 36, 0.08), transparent 55%),
    linear-gradient(180deg, #fafafa 0%, #efefef 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(500px 420px at 85% 85%, rgba(219, 11, 20, 0.08), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.login-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-box {
  background: var(--surface);
  width: min(440px, 92vw);
  padding: 28px 28px;
  border-radius: var(--radius);
  box-shadow: 0 18px 38px rgba(17, 18, 20, 0.12);
  border: 1px solid rgba(219, 11, 20, 0.12);
  border-top: 4px solid var(--accent);
  text-align: center;
  animation: riseIn 0.7s ease both;
}

.login-logo {
  width: 90px;
  margin-bottom: 15px;
}

.logo-outside {
  text-align: center;
  margin-bottom: 10px;
  color: var(--ink);
}

.logo-outside img {
  width: auto;
  height: auto;
  max-height: 70px;
  margin: 0 auto 6px;
}

.logo-outside h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 600;
}

.logo-title {
  font-family: var(--brand-font);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.input-group {
  text-align: left;
  width: 100%;
  margin: 0 0 14px;
}

.input-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-weight: 600;
}

.login-page .input-group input {
  width: 100%;
  display: block;
  padding: 10px 12px;
  font-size: 15px;
}

.login-btn {
  width: 100%;
  margin: 4px 0 0;
  padding: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 22px rgba(219, 11, 20, 0.25);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(219, 11, 20, 0.32);
}

.login-footer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.companies-logos {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.companies-logos img {
  height: 28px;
  object-fit: contain;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.companies-logos img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Header */
.header {
  background: linear-gradient(90deg, #db0b14 0%, #b10810 100%);
  color: #f5f7fb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(17, 18, 20, 0.18);
  backdrop-filter: blur(10px);
  z-index: 900;
}

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

.logo-container img {
  height: 36px;
}

.logo {
  font-family: var(--brand-font);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff3f3;
}

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

.username {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header .user-info .user-avatar {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.header .user-avatar.zoom-hover {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  border: none;
  object-fit: contain;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #f5f7fb;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
}

.menu-btn {
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
}

.menu-btn img {
  width: 26px;
  height: 26px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100% - var(--header-height));
  position: fixed;
  top: var(--header-height);
  left: calc(-1 * var(--sidebar-width));
  background: linear-gradient(180deg, #db0b14 0%, #b10810 100%);
  color: #e6edf4;
  padding: 18px 12px;
  box-shadow: 8px 0 24px rgba(12, 13, 16, 0.28);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: left 0.25s ease;
  z-index: 1000;
}

.sidebar.active {
  left: 0;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.sidebar li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-size: 15px;
  color: #fdebec;
}

.sidebar li:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.sidebar li.active {
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  border-left: 3px solid #ffffff;
  font-weight: 600;
}

.icon-sidebar {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 22px;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

#sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 20, 30, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 998;
}

#sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Main content */
.main-content {
  padding: 32px 28px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content h1 {
  margin-bottom: 24px;
  color: var(--ink);
  font-size: 28px;
  font-family: var(--brand-font);
  letter-spacing: 0.3px;
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(219, 11, 20, 0.4);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 600;
}

.card-body p {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--muted);
}

.card-body button {
  background: var(--accent);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 16px rgba(219, 11, 20, 0.2);
}

.card-body button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

/* Welcome overrides (inicio) */
.welcome-container {
  padding: 110px 32px 60px;
  text-align: center;
}

.welcome-container .welcome-title {
  font-family: var(--brand-font);
  font-size: 42px;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: 0.4px;
  animation: softDown 0.8s ease both;
}

.welcome-container .welcome-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0 auto 40px;
  max-width: 720px;
  animation: softUp 0.9s ease both;
}

.welcome-container .cards {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.welcome-container .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  width: 280px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  animation: riseIn 0.8s ease both;
}

.welcome-container .card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--ink);
}

.welcome-container .card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footer */
body footer,
body .footer {
  text-align: center;
  padding: 16px 12px;
  background: #ededed !important;
  color: #6b6f76 !important;
  border-top: 1px solid #e0e0e0 !important;
  backdrop-filter: blur(6px);
}

/* Animations */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 992px) {
  .main-content {
    padding: 26px 22px 32px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .sidebar {
    width: 220px;
    left: -220px;
  }
}

@media (max-width: 768px) {
  body:not(.login-page) {
    background-attachment: scroll;
  }

  .main-content {
    padding: 22px 16px 28px;
  }

  .sidebar {
    width: 210px;
    left: -210px;
    top: 0;
    height: 100%;
    padding-top: 70px;
  }

  .card img {
    height: 160px;
  }

  .login-box {
    padding: 28px 22px;
  }

  .welcome-container {
    padding: 90px 20px 40px;
  }

  .welcome-container .welcome-title {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .login-box {
    width: 94vw;
  }

  .login-btn,
  .card-body button {
    padding: 10px 12px;
    font-size: 14px;
  }

  .sidebar {
    width: 180px;
    left: -180px;
  }

  .sidebar li {
    padding: 10px 12px;
    font-size: 14px;
  }

  .main-content h1 {
    font-size: 22px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .card-body p {
    font-size: 13px;
  }
}

/* Inicio dreamy side images */
.inicio-page {
  position: relative;
}

.inicio-page .dream-sides {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 120px 60px 80px;
  pointer-events: none;
  z-index: 0;
}

.inicio-page .dream-column {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(240px, 26vw, 360px);
  height: clamp(300px, 44vh, 520px);
}

.inicio-page .dream-left {
  transform: translateY(-10px);
}

.inicio-page .dream-center {
  transform: translateY(0);
}

.inicio-page .dream-right {
  transform: translateY(10px);
}

.inicio-page .dream-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(5px) saturate(112%) contrast(110%);
  transform: scale(1.08);
  border-radius: 28px;
  animation: dreamFade 18s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.95) 65%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.95) 65%, transparent 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.inicio-page .dream-left .dream-img:nth-child(1) {
  animation-delay: 0s;
}

.inicio-page .dream-left .dream-img:nth-child(2) {
  animation-delay: 9s;
}

.inicio-page .dream-center .dream-img:nth-child(1) {
  animation-delay: 3s;
}

.inicio-page .dream-center .dream-img:nth-child(2) {
  animation-delay: 12s;
}

.inicio-page .dream-right .dream-img:nth-child(1) {
  animation-delay: 6s;
}

.inicio-page .dream-right .dream-img:nth-child(2) {
  animation-delay: 15s;
}

@keyframes dreamFade {
  0% { opacity: 0; transform: scale(1.08); }
  18% { opacity: 0.28; transform: scale(1.03); }
  35% { opacity: 0.36; transform: scale(1.01); }
  48% { opacity: 0.24; }
  60% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}

.inicio-page .welcome-container {
  position: relative;
  z-index: 1;
}

@media (max-width: 1000px) {
  .inicio-page .dream-sides {
    display: none;
  }
}

