form {
  background: var(--surface-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  padding: 48px 40px;
  max-width: 500px;
  width: 100%;
  margin: 40px auto; /* Auto margin za centriranje */
  
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TYPOGRAPHY */
h1, .naslov, form h2 {
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-main);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

label {
  display: block;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 5px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background-color: #f9fafb;
  color: var(--text-main);
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Custom Select Arrow */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* BUTTONS */
button {
  width: 100%;
  padding: 14px;
  margin-top: 24px;
  
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  transition: var(--transition);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
  filter: brightness(110%);
}

/* Secondary Button / Link (Register link) */
.reg {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.reg:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* TERMS TEXT */
.terms-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 20px;
  margin-bottom: 0;
  opacity: 0.8;
}

.terms-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(107, 114, 128, 0.4);
  transition: var(--transition);
}

.terms-link:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* TABLE STYLES */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  overflow: hidden;
  border-radius: var(--radius);
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
}

th {
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f1f5f9; }

/* Table Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.odobri { background-color: #dcfce7; color: #166534; }
.odobri:hover { background-color: #bbf7d0; }

.obrisi, .btn-reject { background-color: #fee2e2; color: #991b1b; }
.obrisi:hover, .btn-reject:hover { background-color: #fecaca; }

/* Inline forms in table fix */
table form {
    background: none;
    padding: 0;
    box-shadow: none;
    border: none;
    width: auto;
    display: inline-block;
    margin: 0;
}

/* ALERTS / MESSAGES */
.message-success, .message-error {
  width: 100%;
  padding: 16px;
  margin-top: 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.message-success {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.message-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  /* Back button positioned nicely on mobile */
  .back-btn {
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }

  form {
    padding: 30px 20px;
    border-radius: 20px;
  }

  h1, form h2 { font-size: 1.5rem; margin-bottom: 24px; }
  
  input, select, textarea, button { font-size: 16px; }
  
  /* Table scroll fix */
  table { min-width: 600px; }
  th, td { padding: 12px 10px; }
}