:root {
  /* Type scale - the same six steps as css/style.css and
     admin/inc/admin_layout.php. Repeated here because the client portal loads only this
     stylesheet and never style.css, so without a local
     :root every var(--fs-*) below would resolve to nothing and the declaration
     would be dropped. Keep in step with those two if the scale ever changes. */
  --fs-3xs:  0.65rem;   /* 10.4px - tiny badges, superscript-ish labels  */
  --fs-2xs:  0.7rem;    /* 11.2px - dense table meta, pill text          */
  --fs-xs:   0.78rem;   /* 12.5px - hints, captions (most common size)   */
  --fs-sm:   0.85rem;   /* 13.6px - secondary UI text                    */
  --fs-md:   0.9rem;    /* 14.4px - default UI text                      */
  --fs-base: 1rem;      /* 16px   - emphasised body                      */
}

/*
 * client/client.css — Client portal styles
 * Inherits site CSS variables and fonts; adds portal-specific components.
 */

/* ── Login page ─────────────────────────────────────────────────────────────── */

.client-login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.client-login-box {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
}

.client-login-logo { margin-bottom: 1.5rem; }
.cl-logo { max-height: 56px; width: auto; }

.cl-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary, #111);
}
.cl-sub {
  font-size: var(--fs-md);
  color: var(--text-muted, #666);
  margin-bottom: 1.5rem;
}

.cl-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: var(--fs-md);
  margin-bottom: 1rem;
  text-align: left;
}

.cl-form { text-align: left; }

.cl-field {
  margin-bottom: 1rem;
}
.cl-field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary, #444);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cl-field input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 6px;
  font-size: var(--fs-base);
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  transition: border-color 0.15s;
}
.cl-field input:focus {
  outline: none;
  border-color: var(--accent, #14c8b4);
  box-shadow: 0 0 0 3px rgba(20,200,180,0.12);
}

.cl-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--accent, #14c8b4);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: background 0.15s;
}
.cl-btn:hover { background: var(--accent-dark, #0fa898); }

.cl-back {
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
}
.cl-back a {
  color: var(--text-muted, #666);
  text-decoration: none;
}
.cl-back a:hover { text-decoration: underline; }

/* ── Portal landing page ─────────────────────────────────────────────────────── */

.client-portal-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.cp-greeting {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}
.cp-hello {
  font-size: 1.75rem;
  font-weight: 700;
  flex: 1;
  color: var(--text-primary, #111);
}
.cp-sub {
  font-size: var(--fs-md);
  color: var(--text-muted, #666);
  flex: 1;
}
.cp-logout {
  font-size: var(--fs-sm);
  color: var(--text-muted, #888);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s;
}
.cp-logout:hover {
  color: var(--text-primary, #111);
  border-color: var(--text-primary, #999);
}

.cp-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted, #666);
}

/* Gallery grid */
.cp-galleries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cp-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e0e0e0);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--card-bg, #fff);
}
.cp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

.cp-card-img {
  height: 200px;
  background-color: var(--bg-muted, #f3f4f6);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-card-noimg {
  font-size: var(--fs-xs);
  color: var(--text-muted, #aaa);
}

.cp-card-body {
  padding: 1rem 1.1rem 1.2rem;
}
.cp-card-title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-primary, #111);
}
.cp-card-desc {
  font-size: var(--fs-sm);
  color: var(--text-muted, #666);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
