/* 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: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

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

.ift-hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.ift-hero-btn {
  background: rgba(255,255,255,0.03); 
  border: 1px solid rgba(212,175,55,0.4);
  padding: 40px; 
  border-radius: 16px; 
  text-decoration: none;
  font-size: 1.4rem; 
  font-weight: 600; 
  color: #fff; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 12px;
  min-width: 220px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.ift-hero-btn span.icon {
  font-size: 2.5rem;
}

.ift-hero-btn:hover {
  background: rgba(212,175,55,0.15); 
  transform: translateY(-5px);
  border-color: #D4AF37;
  box-shadow: 0 8px 30px rgba(212,175,55,0.2);
}

/* ── Breadcrumbs ── */
.ift-breadcrumbs {
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ift-breadcrumbs a {
  color: #D4AF37;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.ift-breadcrumbs a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.ift-breadcrumbs .sep {
  color: rgba(255,255,255,0.2);
  margin: 0 2px;
}

/* ── Section Titles ── */
.ift-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin: 30px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── 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: 16px;
}

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

/* ── File Card ── */
.ift-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.ift-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.ift-card-brand {
  text-decoration: none;
  color: inherit;
}

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

.ift-card:hover .ift-card-media img {
  transform: scale(1.05);
}

.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: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ift-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  text-align: center;
}

.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-category {
  display: inline-block;
  background: rgba(212,175,55,0.15);
  color: #D4AF37;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 6px;
  vertical-align: middle;
}

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

.ift-card-caption {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  line-height: 1.35;
  word-break: break-word;
  font-style: italic;
}

.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;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.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,
.ift-btn-copy-caption {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}

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

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

/* ── Caption Cards (Text Only Grid) ── */
.ift-captions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.ift-caption-card {
  background: rgba(255,255,255,0.03); 
  border: 1px solid rgba(255,255,255,0.08);
  padding: 18px; 
  border-radius: 12px; 
  display: flex; 
  flex-direction: column; 
  gap: 14px;
  transition: all 0.2s;
  position: relative;
}

.ift-caption-card:hover {
  border-color: rgba(212,175,55,0.3);
  background: rgba(255,255,255,0.05);
}

.ift-caption-card.consumed {
  border-color: rgba(255,255,255,0.02);
  opacity: 0.4;
  background: transparent;
}

.ift-caption-card.consumed .ift-caption-text {
  text-decoration: line-through;
  color: rgba(255,255,255,0.3);
}

.ift-caption-text { 
  font-size: 0.95rem; 
  color: rgba(255,255,255,0.85); 
  line-height: 1.5; 
  flex: 1; 
  white-space: pre-wrap;
}

.ift-caption-meta { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.ift-badge-consumed { 
  font-size: 0.7rem; 
  color: #22c55e; 
  font-weight: 600; 
  padding: 3px 8px; 
  background: rgba(34,197,94,0.15); 
  border-radius: 5px; 
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── 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);
  backdrop-filter: blur(5px);
}

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

.ift-lightbox img,
.ift-lightbox video {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.ift-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: rgba(255,255,255,0.8);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ift-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: scale(1.05);
}

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

  .ift-hero-buttons {
    flex-direction: column;
    padding: 0 20px;
  }

  .ift-grid, .ift-captions-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 12px;
  }

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

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

  .ift-btn {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}
