.photos-page, .photos-page * { box-sizing: border-box; }

.photos-page{
  display:flex;
  flex-direction:column;
  gap:18px;
  color:rgba(255,255,255,.94);
  min-height:100%;
  padding:4px;
}

.photos-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.photos-header h1{
  margin:0;
  font-size:30px;
  font-weight:800;
}

.photos-header p{
  margin:6px 0 0;
  opacity:.72;
}

.photos-header-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.photos-header-actions .input{
  min-width:280px;
}

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

.photos-stats .stat-card{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:16px;
}

.photos-stats .stat-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.65;
}

.photos-stats .stat-value{
  margin-top:8px;
  font-size:28px;
  font-weight:800;
}

.photos-stats .stat-sub{
  margin-top:4px;
  opacity:.65;
  font-size:13px;
}

.photos-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px;
}

.photo-card{
  overflow:hidden;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}

.photo-thumb-wrap{
  height:210px;
  background:rgba(255,255,255,.03);
}

.photo-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.photo-card-body{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.photo-card-title{
  font-weight:800;
  font-size:16px;
}

.photo-card-sub{
  font-size:13px;
  opacity:.75;
  min-height:34px;
}

.photo-card-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  opacity:.65;
}

.photo-card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.photo-upload-preview{
  min-height:220px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.6);
  overflow:hidden;
}

.photo-upload-preview-img{
  width:100%;
  max-height:420px;
  object-fit:contain;
  display:block;
}

.photos-empty{
  opacity:.7;
  padding:28px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:18px;
  text-align:center;
}

.photos-header-actions .input,
#photosSearch{
  height: 44px;
  min-width: 320px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  outline: none;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.photos-header-actions .input::placeholder,
#photosSearch::placeholder{
  color: rgba(255,255,255,.50);
}

.photos-header-actions .input:focus,
#photosSearch:focus{
  border-color: rgba(59,130,246,.65);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
  background: rgba(255,255,255,.08);
}

.photos-header-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

@media (max-width: 760px){
  .photos-header-actions .input,
  #photosSearch{
    min-width: 100%;
    width: 100%;
  }
}

.photo-view-wrap{
  width:100%;
  max-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  padding:14px;
}

.photo-view-image{
  max-width:100%;
  max-height:65vh;
  object-fit:contain;
  display:block;
  border-radius:12px;
}

.file-upload{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.file-upload-name{
  font-size:13px;
  opacity:.7;
  color:rgba(255,255,255,.85);
}

.file-upload .btn-secondary{
  height:40px;
  padding:0 16px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
  transition:all .15s ease;
}

.file-upload .btn-secondary:hover{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.18);
}

.file-upload .btn-secondary:active{
  transform:translateY(1px);
}