:root{
  --bg: #0b1322;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --primary: #4ea1ff;
  --primary-2: #2d7be8;
  --danger: #ff5a6b;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}

.profile-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 22px 40px;
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.profile-topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  margin-bottom: 18px;
}

.profile-spacer{ flex:1; }

.profile-btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  display:inline-flex;
  gap:10px;
  align-items:center;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}
.profile-btn:hover{ background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); }
.profile-btn:active{ transform: translateY(1px); }

.profile-btn.primary{
  background: linear-gradient(180deg, rgba(78,161,255,.95), rgba(45,123,232,.95));
  border-color: rgba(78,161,255,.35);
  color: #06101f;
  font-weight: 600;
}

.profile-btn.danger{
  background: rgba(255,90,107,.12);
  border-color: rgba(255,90,107,.35);
  color: var(--text);
}

.profile-title{
  margin: 18px 0 14px;
  font-size: 34px;
  letter-spacing: .2px;
}

.profile-grid{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items:start;
}

.profile-card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.profile-card-hd{
  padding: 16px 18px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
}

.profile-card-title{
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.profile-card-bd{
  padding: 16px 18px 18px;
}

.profile-kv{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 14px;
  padding: 10px 0 0;
}
.profile-k{ color: var(--muted); font-size: 13px; }
.profile-v{ color: var(--text); font-size: 14px; }

.profile-muted{ color: var(--muted); font-size: 13px; }

.profile-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.profile-form{
  display:grid;
  gap: 10px;
  margin-top: 10px;
}

.profile-input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  outline:none;
}
.profile-input:focus{ border-color: rgba(78,161,255,.45); }

.profile-table-wrap{ overflow:auto; }

.profile-table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.14);
}

.profile-table th,
.profile-table td{
  padding: 12px 10px;
  text-align:left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}

.profile-table th{ color: var(--muted); font-weight: 600; }
.profile-table tr:hover td{ background: rgba(255,255,255,0.03); }

.profile-right{ text-align:right; }

.profile-toast{
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 92vw;
  display:none;
  font-size: 13px;
  z-index: 9999;
}

@media (max-width: 980px){
  .profile-grid{ grid-template-columns: 1fr; }
  .profile-title{ font-size: 28px; }
}





/* =========================
   PROFIL: FIX "odrezan desni rub" (grid min-width problem)
   ========================= */
.profile-grid > * {
  min-width: 0; /* KLJUČNO: grid item smije shrinkati */
}

/* tablica računa mora scrollati unutar kartice */
.profile-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* neka tablica bude široka koliko treba, ali da ne razvuče karticu */
.profile-table {
  width: max-content;
  min-width: 100%;
}


/* =========================
   PROFIL: dugi email/tekst ne smije izlaziti iz kartice
   ========================= */
.profile-kv .profile-v,
.profile-kv .dt-v,
.profile-kv .value,
.profile-v {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

/* ako ti je email u linku */
.profile-kv a {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-kv .profile-v { line-height: 1.25; }