:root{
  --green-50: #f2fbf4;
  --green-200: #d7f1dc;
  --green-500: #7fd394;
  --white: #ffffff;
  --muted: #6b7280;
  --card-shadow: 0 6px 18px rgba(45, 120, 80, 0.08);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,var(--green-50),#fff);color:#0f172a}
.container{display:flex;min-height:100vh}
.sidebar{width:220px;background:var(--green-500);color:var(--white);padding:28px 20px;display:flex;flex-direction:column}
.brand{font-weight:700;font-size:20px;margin-bottom:18px}
.sidebar nav ul{list-style:none;padding:0;margin:0}
.sidebar nav li{padding:12px 8px;border-radius:8px;cursor:pointer;margin-bottom:8px}
.sidebar nav li.active{background:rgba(255,255,255,0.12)}
.main{flex:1;padding:28px}
.main-header h1{margin:0;font-size:24px}
.subtitle{color:var(--muted);margin-top:6px}
.main-header{display:flex;flex-direction:column;gap:8px}
/* wide screens: put header elements on one row */
@media (min-width:900px){
  .main-header{flex-direction:row;align-items:center;justify-content:space-between}
  .main-header .subtitle{margin:0 16px;flex:1}
}
.card{background:var(--white);border-radius:12px;padding:20px;box-shadow:var(--card-shadow);display:flex;gap:20px;align-items:flex-start}
.profile-card{margin-top:18px}
.profile-left{width:220px;display:flex;align-items:center;flex-direction:column}
.avatar-wrap{display:flex;flex-direction:column;align-items:center}
.avatar-wrap img{width:140px;height:140px;border-radius:12px;object-fit:cover;border:6px solid var(--green-50)}
.upload-btn{margin-top:12px;background:transparent;border:1px dashed var(--green-500);padding:8px 12px;border-radius:8px;color:var(--green-500);cursor:pointer}
.upload-btn input{display:none}
.profile-right{flex:1}
.profile-form .grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.form-group{display:flex;flex-direction:column}
.form-group label{font-size:13px;color:var(--muted);margin-bottom:6px}
.form-group input{padding:10px;border-radius:8px;border:1px solid #e6eef0;background:#fff}
.actions{margin-top:18px;display:flex;gap:10px}
.btn{padding:10px 16px;border-radius:10px;border:none;cursor:pointer}
.btn.primary{background:var(--green-500);color:var(--white);font-weight:600}
.btn.ghost{background:transparent;border:1px solid #e6eef0}
.footer{margin-top:20px;color:var(--muted);font-size:13px}

/* message banner */
.msg { padding: 10px 14px; border-radius: 10px; font-weight: 600; display: inline-block; }
.msg.success{ background:#ecfdf5; color:#065f46; border:1px solid #bbf7d0 }
.msg.error{ background:#fff1f2; color:#9f1239; border:1px solid #fecaca }

/* file delete button */
.file-delete-btn{ background:transparent; border:1px solid #fde68a; padding:6px 8px; border-radius:6px; color:#92400e; cursor:pointer; font-size:12px }

/* modal */
.modal{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(2,6,23,0.45); z-index:60 }
.modal[aria-hidden="true"]{ display:none }
.modal-content{ background:var(--white); padding:18px; border-radius:10px; width:320px; max-width:90%; box-shadow:0 10px 30px rgba(2,6,23,0.12); text-align:center }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px }
.modal-content p{ margin:0; color:#0f172a }


@media (max-width:900px){
  .container{flex-direction:column}
  .sidebar{width:100%;flex-direction:row;align-items:center}
  .profile-form .grid{grid-template-columns:1fr}
  .profile-left{width:100%;flex-direction:row;gap:16px}
  .card{flex-direction:column}
  .main{padding:18px}
  .profile-left{align-items:flex-start}
}

/* small phones: tighter spacing and smaller avatar */
@media (max-width:600px){
  :root{font-size:14px}
  .avatar-wrap img{width:96px;height:96px;border-radius:10px;border-width:4px}
  .upload-btn{padding:6px 10px}
  .actions{flex-direction:column;align-items:stretch}
  .btn{width:100%}
  .profile-form .grid{gap:10px}
  .sidebar{padding:12px}
  .sidebar .brand{font-size:16px}
  .sidebar nav ul{display:flex;gap:8px;overflow:auto}
  .sidebar nav li{white-space:nowrap}
  .filesList{justify-content:flex-start}
}

/* file thumbnails and video sizing */
.filesList img, .filesList video{max-width:180px;height:auto;border-radius:8px;object-fit:cover}
@media (max-width:600px){
  .filesList img, .filesList video{max-width:120px}
}

/* improve messageBar visibility on small screens */
#messageBar{display:inline-block}
