/* ORS Client Portal CSS */
:root {
  --ors-blue:   #4361ee;
  --ors-green:  #06d6a0;
  --ors-border: #e2e8f0;
  --ors-bg:     #f0f2f7;
  --ors-card:   #ffffff;
  --ors-text:   #1e293b;
  --ors-muted:  #64748b;
  --ors-radius: 12px;
  --ors-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.ors-portal { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--ors-text); }

/* Login */
.ors-login-wrap { display: flex; justify-content: center; padding: 48px 16px; }
.ors-login-box  { background: var(--ors-card); border-radius: var(--ors-radius); box-shadow: var(--ors-shadow); padding: 40px; width: 420px; max-width: 100%; }
.ors-login-header { text-align: center; margin-bottom: 28px; }
.ors-login-header h2 { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; }
.ors-login-header p  { color: var(--ors-muted); margin: 0; font-size: 14px; }
.ors-login-form { display: flex; flex-direction: column; gap: 16px; }

/* Fields */
.ors-field { display: flex; flex-direction: column; gap: 6px; }
.ors-field label { font-size: 13px; font-weight: 600; }
.ors-field input { border: 1px solid var(--ors-border); border-radius: 8px; padding: 10px 14px; font-size: 14px; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.ors-field input:focus { outline: none; border-color: var(--ors-blue); box-shadow: 0 0 0 3px rgba(67,97,238,.15); }

/* Buttons */
.ors-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.ors-btn--primary  { background: var(--ors-blue); color: #fff; }
.ors-btn--primary:hover  { background: #3451d1; }
.ors-btn--secondary{ background: var(--ors-muted); color: #fff; }
.ors-btn--ghost    { background: transparent; color: var(--ors-text); border: 1px solid var(--ors-border); }
.ors-btn--ghost:hover    { background: var(--ors-bg); }
.ors-btn--sm  { padding: 6px 14px; font-size: 13px; }
.ors-btn--full { width: 100%; justify-content: center; }

/* Alerts */
.ors-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.ors-alert--error   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.ors-alert--warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

/* Dashboard */
.ors-dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.ors-dashboard-header h2 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 700; }
.ors-dashboard-header p  { margin: 0; color: var(--ors-muted); }
.ors-empty { text-align: center; padding: 48px 24px; color: var(--ors-muted); }

/* Project Grid */
.ors-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 20px; }
.ors-project-card { background: var(--ors-card); border-radius: var(--ors-radius); padding: 24px; box-shadow: var(--ors-shadow); display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--ors-border); transition: transform .15s, box-shadow .15s; }
.ors-project-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.ors-project-card__header { display: flex; justify-content: space-between; align-items: center; }
.ors-project-card__header small { color: var(--ors-muted); font-size: 12px; font-family: monospace; }
.ors-project-card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.ors-project-card__meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ors-muted); }
.ors-project-card .ors-btn { margin-top: 8px; }

/* Badges */
.ors-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ors-badge--active    { background: #dcfce7; color: #15803d; }
.ors-badge--completed { background: #dbeafe; color: #1d4ed8; }
.ors-badge--on_hold   { background: #fef3c7; color: #b45309; }
.ors-badge--cancelled { background: #fee2e2; color: #dc2626; }

/* Project Detail */
.ors-project-detail__back   { margin-bottom: 20px; }
.ors-project-detail__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.ors-project-detail__header h2 { margin: 0 0 4px; font-size: 1.6rem; font-weight: 700; }
.ors-project-detail__header code { font-size: 13px; color: var(--ors-muted); }
.ors-project-detail__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.ors-meta-card { background: var(--ors-card); border-radius: 10px; padding: 16px 20px; box-shadow: var(--ors-shadow); display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.ors-meta-card span { font-size: 12px; color: var(--ors-muted); }
.ors-meta-card strong { font-size: 1rem; font-weight: 700; }

/* Section */
.ors-section { margin-bottom: 36px; }
.ors-section h3 { font-size: 1.1rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ors-border); }

/* Gallery */
.ors-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.ors-gallery__item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: block; }
.ors-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; cursor: pointer; }
.ors-gallery__item:hover img { transform: scale(1.05); }
.ors-gallery__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; padding: 10px; opacity: 0; transition: opacity .2s; }
.ors-gallery__item:hover .ors-gallery__overlay { opacity: 1; }
.ors-gallery__dl { color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; background: rgba(255,255,255,.2); padding: 5px 10px; border-radius: 5px; }

/* Dealer */
.ors-dealer-block { background: var(--ors-bg); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.ors-dealer-block h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.ors-dealer-loc { font-size: 13px; color: var(--ors-muted); margin: 0 0 14px; }

/* Documents */
.ors-doc-list { display: flex; flex-direction: column; gap: 8px; }
.ors-doc-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ors-bg); border-radius: 8px; text-decoration: none; color: var(--ors-text); transition: background .15s; }
.ors-doc-item:hover { background: #e2e8f0; }
.ors-doc-icon { font-size: 1.4rem; }
.ors-doc-name { flex: 1; font-weight: 500; font-size: 14px; }
.ors-doc-type { font-size: 11px; font-weight: 600; color: var(--ors-muted); }
.ors-doc-action { font-size: 13px; color: var(--ors-blue); font-weight: 600; }

/* Lightbox */
.ors-lightbox { position: fixed; inset: 0; z-index: 99999; }
.ors-lightbox__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.ors-lightbox__content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.ors-lightbox__img { max-width: 90vw; max-height: 80vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); object-fit: contain; }
.ors-lightbox__close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.3rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; z-index: 1; }
.ors-lightbox__prev, .ors-lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.ors-lightbox__prev { left: 16px; }
.ors-lightbox__next { right: 16px; }
.ors-lightbox__dl { color: rgba(255,255,255,.85); font-size: 13px; text-decoration: none; }

.ors-muted { color: var(--ors-muted); font-size: 13px; }

@media (max-width: 600px) {
  .ors-login-box { padding: 28px 20px; }
  .ors-project-detail__meta { flex-direction: column; }
  .ors-gallery { grid-template-columns: repeat(2, 1fr); }
}
