/* Internal File Transfer Portal - Lightweight Dark Theme */

/* ── Layout ── */
.ift-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ── Landing (no account) ── */
.ift-landing {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ift-landing h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.ift-landing p {
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
}

/* ── Account Header ── */
.ift-account-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}

.ift-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212,175,55,0.4);
  flex-shrink: 0;
}

.ift-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(212,175,55,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4AF37;
  font-size: 1.2rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ift-account-info h1 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.ift-account-info p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ── Date Bar ── */
.ift-date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.ift-current-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}

.ift-current-date strong {
  color: #fff;
}

.ift-history-toggle {
  padding: 7px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ift-history-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ift-history-toggle.active {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.3);
  color: #D4AF37;
}

/* ── History Dropdown ── */
.ift-history-panel {
  display: none;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

.ift-history-panel.open {
  display: block;
}

.ift-history-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.ift-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ift-date-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ift-date-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ift-date-btn.active {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.3);
  color: #D4AF37;
}

/* ── File Grid ── */
.ift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ── File Card ── */
.ift-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ift-card:hover {
  border-color: rgba(255,255,255,0.12);
}

.ift-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #111;
  overflow: hidden;
  cursor: pointer;
}

.ift-card-media img,
.ift-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ift-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ift-card-body {
  padding: 12px;
}

.ift-card-filename {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ift-card-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 8px;
  line-height: 1.4;
  word-break: break-word;
}

.ift-card-link {
  display: inline-block;
  font-size: 0.82rem;
  color: #D4AF37;
  text-decoration: none;
  margin-bottom: 10px;
  word-break: break-all;
  transition: opacity 0.2s;
}

.ift-card-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.ift-card-actions {
  display: flex;
  gap: 6px;
}

.ift-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 7px;
  border: none;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ift-btn-download {
  background: rgba(212,175,55,0.12);
  color: #D4AF37;
}

.ift-btn-download:hover {
  background: rgba(212,175,55,0.25);
}

.ift-btn-copy,
.ift-btn-copy-text {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}

.ift-btn-copy:hover,
.ift-btn-copy-text:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ift-btn-copy.copied,
.ift-btn-copy-text.copied {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

/* ── Empty / Error ── */
.ift-empty,
.ift-error {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.35);
  font-size: 0.95rem;
}

.ift-error {
  color: rgba(239,68,68,0.7);
}

/* ── Lightbox ── */
.ift-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
}

.ift-lightbox.open {
  display: flex;
}

.ift-lightbox img,
.ift-lightbox video {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
}

.ift-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
}

.ift-lightbox-close:hover {
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .ift-container {
    padding: 14px 12px 50px;
  }

  .ift-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .ift-card-body {
    padding: 10px;
  }

  .ift-account-header {
    padding: 14px 0;
  }

  .ift-btn {
    padding: 7px 6px;
    font-size: 0.72rem;
  }
}
