/* ==========================================================================
   /assets/css/video-manage.css
   - video_manage.php 전용
   - 데스크톱/태블릿/모바일 반응형
   ========================================================================== */

.page-video-manage .layout-1440{
  max-width: 1440px;
}

.vm-hero.card,
.vm-list.card{
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

/* -------------------------
   HERO 레이아웃
------------------------- */
.vm-hero{
  margin-top: 6px;
  display: flex;
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  justify-content: space-between; /* 유지 */
}


.vm-hero-left{
  flex: 1 1 auto;
  min-width: 0;
}

.vm-title{
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.vm-sub{
  margin: 0 0 14px;
  color: rgba(15, 23, 42, .75);
  font-size: 14px;
}

.vm-quickrow{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.vm-quicklabel{
  font-size: 13px;
  color: rgba(15, 23, 42, .7);
  white-space: nowrap;
}

.vm-quicktabs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.vm-pill{
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .14);
  background: #fff;
  color: rgba(15, 23, 42, .9);
  font-size: 13px;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.vm-pill:hover{
  background: rgba(59, 130, 246, .06);
  border-color: rgba(59, 130, 246, .25);
  transform: translateY(-1px);
}

.vm-pill.active{
  background: rgba(59, 130, 246, .12);
  border-color: rgba(59, 130, 246, .35);
  color: rgba(30, 64, 175, 1);
  font-weight: 700;
}

/* -------------------------
   HERO 오른쪽: 버튼 + 필터폼
------------------------- */
.vm-hero-right{
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vm-hero-right{
  flex: 1 1 auto;     /* 고정폭 제거 */
  display: flex;
  flex-direction: column;
  align-items: center;  /* 가로 중앙 */
  justify-content: center;
}

.vm-hero-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.vm-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .14);
  background: #fff;
  color: rgba(15, 23, 42, .92);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.vm-cta:hover{
  background: rgba(15, 23, 42, .03);
  transform: translateY(-1px);
}

.vm-cta-primary{
  background: rgba(59, 130, 246, 1);
  border-color: rgba(59, 130, 246, 1);
  color: #fff;
}

.vm-cta-primary:hover{
  background: rgba(37, 99, 235, 1);
  border-color: rgba(37, 99, 235, 1);
}

/* 필터 폼 */
.vm-form--hero{
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 14px;
  padding: 14px;
  background: rgba(15, 23, 42, .02);
}

.vm-field{
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.vm-field:last-child{ margin-bottom: 0; }

.vm-label{
  font-size: 13px;
  color: rgba(15, 23, 42, .7);
}

.vm-select{
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .14);
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
  outline: none;
}

.vm-select:focus{
  border-color: rgba(59, 130, 246, .55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

/* -------------------------
   LIST / GRID
------------------------- */
.vm-list{
  margin-top: 18px;
  padding: 18px;
}

.vm-empty{
  padding: 40px 10px;
  text-align: center;
  color: rgba(15, 23, 42, .65);
}

.vm-empty-actions{
  margin-top: 10px;
  font-size: 13px;
}

.vm-empty-actions a{
  color: rgba(59, 130, 246, 1);
  text-decoration: none;
  font-weight: 700;
}

.vm-empty-actions .dot{
  margin: 0 6px;
  opacity: .5;
}

.vm-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.vm-item{
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.vm-media{
  aspect-ratio: 4 / 3;   /* 더 높아짐 */
  background: rgba(15, 23, 42, .04);
}

.vm-media video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.vm-meta{
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vm-name{
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, .92);
  word-break: break-word;
  margin-bottom: 4px;
}

.vm-submeta{
  font-size: 11px;
  color: rgba(15, 23, 42, .64);
  display: flex;
  justify-content: space-between;  /* 왼쪽 설명 / 오른쪽 삭제 */
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.vm-submeta{
  display: flex;
  justify-content: space-between;  /* 왼쪽 설명 / 오른쪽 삭제 */
  align-items: center;
}


.vm-submeta .sep{
  opacity: .45;
}

.vm-del{
  margin-top: 0px;
  display: flex;
  justify-content: flex-end;
}

.vm-delbtn{
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, .30);
  background: rgba(239, 68, 68, .08);
  color: rgba(185, 28, 28, 1);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.vm-delbtn:hover{
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .45);
  transform: translateY(-1px);
}

/* ==========================================================================
   반응형: 태블릿
   ========================================================================== */
@media (max-width: 1024px){
  .vm-hero{
    flex-direction: column;
    padding: 18px;
  }

  .vm-hero-right{
    flex: 1 1 auto;
    width: 100%;
  }

  .vm-hero-actions{
    justify-content: flex-start;
  }

  .vm-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vm-media video{
    height: 220px;
  }
}

/* ==========================================================================
   반응형: 모바일
   ========================================================================== */
@media (max-width: 640px){
  .vm-hero{
    padding: 16px;
    gap: 14px;
  }

  .vm-title{
    font-size: 20px;
  }

  .vm-quickrow{
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  /* pills 가로 스크롤(모바일에서 줄바꿈 대신 깔끔하게) */
  .vm-quicktabs{
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .vm-quicktabs::-webkit-scrollbar{ height: 6px; }
  .vm-quicktabs::-webkit-scrollbar-thumb{
    background: rgba(15, 23, 42, .12);
    border-radius: 999px;
  }

  .vm-hero-actions{
    flex-wrap: wrap;
    gap: 8px;
  }

  .vm-cta{
    flex: 1 1 auto;
  }

  .vm-form--hero{
    padding: 12px;
  }

  .vm-field{
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .vm-media video{
    height: 210px;
  }

  .vm-list{
    padding: 14px;
  }
}

/* === 오른쪽 필터 박스: 중앙정렬 + 컴팩트 === */
.vm-hero-right{
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;     /* ✅ 가운데 */
  justify-content: center; /* ✅ 세로도 가운데 느낌 */
}

.vm-hero-actions{
  width: 100%;
  display: flex;
  justify-content: center; /* ✅ 버튼도 가운데 */
  gap: 10px;
}

.vm-form--hero{
  width: 100%;
  max-width: 320px;        /* ✅ 컴팩트 폭 */
  border-radius: 14px;
  padding: 12px;
}

/* 레이블/셀렉트 간격 조금 더 타이트 */
.vm-field{
  grid-template-columns: 74px 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.vm-select{
  height: 36px;
  border-radius: 12px;
}



/* 1. 히어로 섹션 구조 재배치 */
.vm-hero.card {
    display: flex;
    flex-direction: row; /* 가로 배치 */
    align-items: center; /* 세로 중앙 정렬 */
    justify-content: flex-start;
    padding: 20px 30px;
    gap: 40px; /* 왼쪽 제목 영역과 필터 사이 간격 */
    background: #ffffff;
    border-radius: 20px;
}

/* 2. 필터 폼 (중앙/우측 1열 배치 핵심) */
.vm-form--hero {
    display: flex;
    flex-direction: row; /* 1열 가로 배치 */
    align-items: center;
    gap: 24px; /* 카테고리와 연도 사이 간격 */
    padding: 10px 20px;
    background: #f8fafc; /* 살짝 밝은 회색 배경으로 영역 구분 */
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    
    /* 우측 끝으로 밀고 싶다면 margin-left: auto; 
       중앙 공간에 두고 싶다면 아래 설정 유지 */
    margin-left: 20px; 
}

/* 3. 개별 필드(라벨+셀렉트) 스타일 */
.vm-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vm-label {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    white-space: nowrap;
}

/* 4. 셀렉트 박스 디자인 최적화 */
.vm-select {
    appearance: none; /* 기본 화살표 제거 (세련된 커스텀 위함) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    
    padding: 6px 32px 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s;
}

.vm-select:hover {
    border-color: #3b4fd8;
    box-shadow: 0 0 0 3px rgba(59, 79, 216, 0.1);
}

.vm-select:focus {
    outline: none;
    border-color: #3b4fd8;
}


/* =========================================================
   중앙 필터바: 카테고리 + 연도 한 줄(가로 1열)
   ========================================================= */

.vm-form--center{
  width: 100%;
  display: flex;
  flex-direction: row;     /* ✅ 한 줄(가로) */
  justify-content: center; /* ✅ 가운데 정렬 */
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

/* 각 필드(카테고리/연도) 라벨+셀렉트는 세로(라벨 위, 셀렉트 아래) 유지 */
.vm-form--center .vm-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  width: 200px;            /* ✅ 옵션칸 줄이기 (원하면 180~240 조절) */
  max-width: 240px;
}

/* 셀렉트는 필드 폭에 꽉 차게 */
.vm-form--center .vm-select{
  width: 100%;
  height: 32px;
  min-width: 0;
  font-size: 13px;
  border-radius: 12px;
}

/* (선택) 모바일에서는 다시 1열(세로)로 떨어뜨리기 */
@media (max-width: 640px){
  .vm-form--center{
    flex-direction: column;
    align-items: stretch;
  }
  .vm-form--center .vm-field{
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* =========================================================
   HERO: 3-컬럼 균형형 (좌/중/우)
   - 좌: 타이틀/바로가기
   - 중: 필터(카테고리/연도) "카드 전체 중앙"
   - 우: 업로드/Archive 버튼
   ========================================================= */

.vm-hero{
  /* 기존 flex를 grid로 교체 */
  display: grid !important;
  grid-template-columns: 1fr auto auto;  /* 좌:가변 / 중:필터폭 / 우:버튼폭 */
  align-items: center;
  gap: 22px;
  padding: 22px;
}

/* 가운데 칼럼 */
.vm-hero-center{
  display: flex;
  justify-content: center;   /* 가운데 칼럼 내부도 중앙 */
  align-items: center;
}

/* 오른쪽 버튼 칼럼 */
.vm-hero-right{
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* 버튼 줄 */
.vm-hero-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =========================
   중앙 필터폼: 한 줄(가로 1열)
   ========================= */

.vm-form--hero.vm-form--center{
  display: flex;
  flex-direction: row;      /* ✅ 한 줄 */
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .02);
  border: 1px solid rgba(15, 23, 42, .10);
}

/* 필드(라벨+셀렉트)도 한 줄 */
.vm-form--hero.vm-form--center .vm-field{
  display: flex;
  flex-direction: row;      /* ✅ 라벨-셀렉트 가로 */
  align-items: center;
  gap: 10px;
  margin: 0;
}

/* 라벨 폭을 고정해서 두 필드가 정렬돼 보이게 */
.vm-form--hero.vm-form--center .vm-label{
  width: 24px;              /* ✅ 필요시 48~70 조절 */
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(15, 23, 42, .7);
}

/* 옵션칸(셀렉트) 폭 줄이기 */
.vm-form--hero.vm-form--center .vm-select{
  height: 32px;
  width: 120px;             /* ✅ 필요시 120~160 조절 */
  min-width: 120px;
  font-size: 13px;
  border-radius: 12px;
}

/* =========================
   반응형: 화면 좁아지면 세로로
   ========================= */
@media (max-width: 1024px){
  .vm-hero{
    grid-template-columns: 1fr;   /* 한 줄 스택 */
    gap: 14px;
  }

  .vm-hero-right{
    justify-content: flex-start;
  }

  .vm-hero-center{
    justify-content: flex-start;  /* 모바일에서 좌측 정렬이 더 자연스러움 */
  }

  .vm-form--hero.vm-form--center{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* =========================================================
   HERO RIGHT: 버튼은 우측정렬 유지 + 필터박스(배경) 넓게/얇게
   ========================================================= */

/* 버튼 2개는 우측 정렬 */
.vm-hero-actions{
  width: 100%;
  display: flex;
  justify-content: flex-end;   /* ✅ 우측 */
  gap: 10px;
}

/* 필터 박스(배경) 넓게 + 얇게 */
.vm-form--hero.vm-form--center{
  width: 100%;                 /* ✅ 배경 폭 늘림(오른쪽 영역 가득) */
  max-width: 520px;            /* ✅ 너무 커지면 제한 (원하면 560~640) */
  margin-left: auto;           /* ✅ 오른쪽으로 붙임 */
  margin-right: 0;

  padding: 8px 12px;           /* ✅ 얇게(기존 12~14 -> 8) */
  border-radius: 14px;
  gap: 12px;

  background: rgba(15,23,42,.02);
  border: 1px solid rgba(15,23,42,.10);
}

/* 라벨/셀렉트 높이도 같이 슬림하게 */
.vm-form--hero.vm-form--center .vm-label{
  width: 56px;                 /* 라벨 폭 */
  font-size: 12px;             /* ✅ 조금 더 작게 */
  line-height: 1;
}

.vm-form--hero.vm-form--center .vm-select{
  height: 32px;                /* ✅ 더 얇게 */
  padding: 0 28px 0 10px;       /* ✅ 좌우 패딩 줄임 */
  font-size: 13px;
  border-radius: 12px;

  width: 150px;                /* ✅ 옵션칸 폭 늘림 */
  min-width: 150px;
}

/* 필드 간격도 살짝 타이트 */
.vm-form--hero.vm-form--center .vm-field{
  gap: 8px;
}


/* 파일명 */
.vm-filename{
  font-size:12px;          /* 조금 작게 */
  font-weight:700;
  margin-bottom: 0px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* 메타 + 삭제버튼 줄 */
.vm-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* 왼쪽 메타 */
.vm-submeta{
  font-size:12px;
  color:#64748b;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

/* 삭제 버튼 */
.vm-del{
  margin:0;
  flex-shrink:0;
}

