:root {
  --background: #f4f5f7;
  --panel: #ffffff;
  --text: #171717;
  --muted: #6f7379;
  --border: #dfe2e6;
  --red: #d71920;
  --red-dark: #b31218;
  --black: #111111;
  --radius: 12px;
  --shadow:
    0 8px 28px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  width: 100%;
  padding: 14px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.topbar-grid {
  width: min(1500px, calc(100% - 40px));
  min-height: 54px;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 0 auto;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 64px;
  height: 40px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  border-radius: 5px;
  font-weight: 900;
  letter-spacing: -1px;
}

.brand-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-title strong {
  font-size: 1rem;
}

.brand-title span {
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.topbar-right {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 14px;
  align-items: center;
}

.selection-summary {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  color: var(--muted);
  background: #f7f7f8;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  text-align: center;
}

.user-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--black);
  border-radius: 50%;
  font-weight: 700;
}

.workspace {
  width: min(1500px, calc(100% - 40px));
  margin: 26px auto 50px;
}

.main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.panel {
  min-width: 0;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lower-panel {
  min-height: 290px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-row,
.request-form {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

input:focus {
  border-color: var(--red);
  box-shadow:
    0 0 0 3px rgba(215, 25, 32, 0.12);
}

.primary-button,
.secondary-button,
.download-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
}

.primary-button {
  color: #ffffff;
  background: var(--red);
}

.primary-button:hover {
  background: var(--red-dark);
}

.secondary-button {
  color: #ffffff;
  background: var(--black);
}

.download-button {
  color: var(--black);
  background: #ffffff;
  border-color: var(--black);
}

.file-window {
  min-height: 340px;
  max-height: 500px;
  overflow: auto;
  margin-top: 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.empty-state {
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.production-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.production-actions button {
  width: 100%;
  min-height: 58px;
}

.status-area {
  min-height: 24px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 950px) {
  .topbar-grid {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .selection-summary {
    justify-content: center;
  }

  .user-area {
    justify-content: flex-end;
  }

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

@media (max-width: 560px) {
  .workspace {
    width: min(100% - 22px, 1500px);
    margin-top: 14px;
  }

  .topbar {
    padding: 12px 0;
  }

  .topbar-grid {
    width: min(100% - 22px, 1500px);
  }

  .topbar-right {
    grid-template-columns: 1fr;
  }

  .user-area {
    justify-content: flex-start;
  }

  .brand-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .brand-title span {
    padding-left: 0;
    border-left: 0;
  }

  .panel {
    padding: 18px;
  }

  .search-row,
  .request-form,
  .production-actions {
    grid-template-columns: 1fr;
  }
}

.file-row {
  min-height: 58px;
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto
    auto;
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  padding: 0;
}

.file-information {
  min-width: 0;
  overflow: hidden;
}

.file-information strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}





.production-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

@media (max-width: 620px) {
  .file-row {
    grid-template-columns:
      auto
      minmax(0, 1fr);
  }

  .file-row > span,
  
}

.file-row {
  min-height: 58px;
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto
    auto;
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  padding: 0;
}

.file-information {
  min-width: 0;
  overflow: hidden;
}

.file-information strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}





.production-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

@media (max-width: 620px) {
  .file-row {
    grid-template-columns:
      auto
      minmax(0, 1fr);
  }

  .file-row > span,
  
}

.ftp-action-bar {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.ftp-action-bar button {
  width: 100%;
  min-height: 48px;
}

.ftp-action-bar button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.file-row {
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto !important;
}

/* Organization logo — fixed display size */

.brand-mark {
  width: 96px;
  height: 42px;
  flex: 0 0 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px 8px;
}

.brand-mark.has-logo {
  background: transparent;
  border: 1px solid var(--border);
}

.organization-logo {
  display: block;
  width: 80px;
  height: 32px;
  max-width: 80px;
  max-height: 32px;
  object-fit: contain;
  object-position: center;
}

.organization-logo[hidden],
#organizationInitials[hidden] {
  display: none;
}

/* Platform default or custom organization logo */

.brand-mark,
.brand-mark.has-logo {
  width: 126px;
  height: 48px;
  flex: 0 0 126px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  overflow: hidden;
}

.organization-logo {
  display: block;
  width: 110px;
  height: 40px;
  max-width: 110px;
  max-height: 40px;
  object-fit: contain;
  object-position: center;
}

/* Header branding — Version 1 proportions */

.brand-mark,
.brand-mark.has-logo {
  width: 90px !important;
  height: 42px !important;
  flex: 0 0 90px !important;
  display: grid !important;
  place-items: center !important;
  padding: 4px 7px !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
}

.organization-logo {
  display: block !important;
  width: 76px !important;
  height: 32px !important;
  max-width: 76px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  object-position: center !important;
}

#organizationName {
  display: none !important;
}

/* Keep TTN Production aligned directly beside the logo */

.brand-title,
.brand-copy,
.brand-text {
  margin-left: 0 !important;
}

.brand-title h1,
.brand-copy h1,
.brand-text h1 {
  margin: 0 !important;
  white-space: nowrap;
}

/* Larger TTN header logo */

.brand-mark,
.brand-mark.has-logo {
  width: 132px !important;
  height: 50px !important;
  flex: 0 0 132px !important;
  padding: 3px 6px !important;
}

.organization-logo {
  width: 120px !important;
  height: 44px !important;
  max-width: 120px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Extra Large Header Logo */

.brand-mark,
.brand-mark.has-logo{
    width:160px !important;
    height:56px !important;
    flex:0 0 160px !important;
    padding:2px 6px !important;
    background:transparent !important;
    border:none !important;
}

.organization-logo{
    width:148px !important;
    height:50px !important;
    max-width:148px !important;
    max-height:50px !important;
    object-fit:contain !important;
    object-position:center !important;
}

/* Extra Large Header Logo */

.brand-mark,
.brand-mark.has-logo{
    width:160px !important;
    height:56px !important;
    flex:0 0 160px !important;
    padding:2px 6px !important;
    background:transparent !important;
    border:none !important;
}

.organization-logo{
    width:148px !important;
    height:50px !important;
    max-width:148px !important;
    max-height:50px !important;
    object-fit:contain !important;
    object-position:center !important;
}

/* TTN Header - Version 1 Large Logo */

.brand-mark,
.brand-mark.has-logo{
    width:220px !important;
    height:70px !important;
    flex:0 0 220px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    margin-right:14px !important;
    background:transparent !important;
    border:none !important;
    overflow:visible !important;
}

.organization-logo{
    width:210px !important;
    height:64px !important;
    max-width:210px !important;
    max-height:64px !important;
    object-fit:contain !important;
    object-position:left center !important;
}

#organizationInitials{
    display:none !important;
}

/* ===== TTN Header - Large V1 Logo ===== */

.brand-mark,
.brand-mark.has-logo{
    width:280px !important;
    height:80px !important;
    flex:0 0 280px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    padding:0 !important;
    margin-right:16px !important;
    background:transparent !important;
    border:none !important;
    overflow:visible !important;
}

.organization-logo{
    width:265px !important;
    height:72px !important;
    max-width:265px !important;
    max-height:72px !important;
    object-fit:contain !important;
    object-position:left center !important;
}

#organizationInitials{
    display:none !important;
}

/* ===== Reduce File Windows ===== */

#ftpResults,
#diskResults{
    height:420px !important;
    max-height:420px !important;
    overflow-y:auto !important;
}


/* TTN Production Title */

.brand-title,
.brand-copy,
.brand-text{
    display:flex;
    align-items:center;
}

.brand-title h1,
.brand-copy h1,
.brand-text h1{
    font-size:32px !important;
    font-weight:800 !important;
    letter-spacing:-0.6px;
    line-height:1;
    color:#111;
    margin:0;
}

.brand-title p,
.brand-copy p,
.brand-text p{
    display:none !important;
}


/* TTN Production title — correct selector */

.brand-title > span {
  color: #111111 !important;
  font-size: 34px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.7px !important;
  padding-left: 18px !important;
  border-left: 2px solid var(--border) !important;
  white-space: nowrap !important;
}

/* ===== Final Header Tuning ===== */

/* Logo ligeramente más grande */
.brand-mark,
.brand-mark.has-logo{
    width:300px !important;
    height:84px !important;
    flex:0 0 300px !important;
}

.organization-logo{
    width:285px !important;
    height:76px !important;
    max-width:285px !important;
    max-height:76px !important;
    object-fit:contain !important;
    object-position:left center !important;
}

/* TTN Production más elegante */
.brand-title > span{
    font-size:34px !important;
    font-weight:600 !important;   /* SemiBold */
    letter-spacing:-0.5px !important;
    color:#111 !important;
    border-left:2px solid var(--border) !important;
    padding-left:18px !important;
}


/* ==========================================
   Application Footer
   ========================================== */

.application-footer {
  width: 100%;
  margin-top: 28px;
  padding: 18px 24px 22px;
  color: #777c83;
  background: transparent;
  font-size: 0.8rem;
}

.application-footer-inner {
  width: min(1400px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0 auto;
}

.application-footer a,
.footer-version-button {
  color: #555b63;
  text-decoration: none;
  transition:
    color 150ms ease;
}

.application-footer a:hover,
.footer-version-button:hover {
  color: #111111;
}

.footer-version-button {
  padding: 0;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.footer-separator {
  color: #c5c8cc;
}

/* ==========================================
   About Modal
   ========================================== */

body.about-open {
  overflow: hidden;
}

.about-overlay[hidden] {
  display: none;
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    rgba(16, 18, 21, 0.66);
  opacity: 0;
  transition:
    opacity 180ms ease;
}

.about-overlay.is-visible {
  opacity: 1;
}

.about-dialog {
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8dbe0;
  border-radius: 14px;
  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.32);
  outline: none;
  transform:
    translateY(12px)
    scale(0.985);
  transition:
    transform 180ms ease;
}

.about-overlay.is-visible
.about-dialog {
  transform:
    translateY(0)
    scale(1);
}

.about-dialog-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #e3e5e8;
}

.about-dialog-header h2 {
  margin: 0;
  color: #15171a;
  font-size: 1.14rem;
  font-weight: 700;
}

.about-close-x {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #555a61;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.about-close-x:hover {
  color: #111111;
  background: #f0f1f3;
}

.about-dialog-content {
  overflow-y: auto;
  padding: 30px 34px;
  text-align: center;
}

.about-developer-brand {
  min-height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.three-gatos-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 420px;
  max-height: 130px;
  object-fit: contain;
}

.three-gatos-logo[hidden],
.three-gatos-logo-fallback[hidden] {
  display: none;
}

.three-gatos-logo-fallback {
  color: #15171a;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.about-dialog-content h3 {
  margin: 0 0 22px;
  color: #15171a;
  font-size: 1.55rem;
  font-weight: 700;
}

.about-version-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 390px;
  margin: 0 auto 24px;
}

.about-version-grid div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #f5f6f7;
  border: 1px solid #e1e3e6;
  border-radius: 9px;
}

.about-version-grid span {
  color: #777c83;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-version-grid strong {
  color: #17191c;
  font-size: 0.98rem;
}

.about-developed-by,
.about-powered-by {
  margin: 9px 0;
  color: #62676e;
}

.about-developed-by a {
  color: #17191c;
  font-weight: 700;
  text-decoration: none;
}

.about-powered-by strong {
  color: #17191c;
}

.about-divider {
  height: 1px;
  margin: 27px 0;
  background: #e1e3e6;
}

.about-legal {
  color: #5f646b;
  font-size: 0.82rem;
  line-height: 1.58;
  text-align: left;
}

.about-legal p {
  margin: 0 0 14px;
}

.about-contact {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 24px;
}

.about-contact a {
  color: #17191c;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.about-contact a:hover {
  text-decoration: underline;
}

.about-dialog-footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  background: #f7f8f9;
  border-top: 1px solid #e1e3e6;
}

.about-dialog-footer span {
  color: #81868c;
  font-size: 0.75rem;
}

.about-close-button {
  min-height: 40px;
  padding: 0 20px;
  color: #ffffff;
  background: #17191c;
  border: 0;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.about-close-button:hover {
  background: #30343a;
}

@media (max-width: 620px) {
  .application-footer-inner {
    flex-direction: column;
    gap: 7px;
  }

  .footer-separator {
    display: none;
  }

  .about-overlay {
    padding: 12px;
  }

  .about-dialog {
    max-height:
      calc(100vh - 24px);
  }

  .about-dialog-content {
    padding: 25px 21px;
  }

  .about-version-grid {
    grid-template-columns: 1fr;
  }
}
