/* ============================================================
   PORTAL CLIENȚI - CSS
   ============================================================ */

:root {
  --verde: #1a3a2a;
  --verde-light: #eaf3de;
  --verde-dark: #224d36;
  --text-1: #1a1a1a;
  --text-2: #555;
  --text-3: #888;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f9f8f3;
  --border: #e2e0d6;
  --red: #c01818;
  --red-light: #fae8e8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============== LAYOUT AUTH PAGE ============== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-logo .badge {
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.auth-logo p {
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
}

.auth-card h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--verde);
}
.auth-card .subtitle {
  margin: 0 0 24px 0;
  color: var(--text-2);
}

/* ============== FORM ============== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-1);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.1);
}

.form-group .hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--verde);
  color: #fff;
  border-color: var(--verde);
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  background: var(--verde-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--verde);
  border-color: transparent;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

/* ============== ALERTS ============== */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  border-left: 4px solid var(--text-2);
}
.alert-success {
  background: var(--verde-light);
  color: var(--verde-dark);
  border-left-color: var(--verde);
}
.alert-danger {
  background: var(--red-light);
  color: var(--red);
  border-left-color: var(--red);
}
.alert-info {
  background: #e6f4f8;
  color: #0e6c8e;
  border-left-color: #0e6c8e;
}

/* ============== MISC ============== */
.divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.divider span {
  background: var(--surface);
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-3);
  position: relative;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== APP LAYOUT (după login) ============== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header .badge {
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.app-header .info { flex: 1; min-width: 0; }
.app-header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.app-header .meta {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}

@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .app-header { padding: 12px 16px; }
}
