/* ============================================================
   Vendor Portal — vendor.css
   vendor.gprfieldservices.com
   ============================================================ */

:root {
  --primary:      #0f85a9;
  --primary-dark: #093653;
  --primary-light:#37add1;
  --accent:       #06243a;
  --bg:           #f5fafd;
  --surface:      #ffffff;
  --border:       #d6eaf2;
  --text:         #1a2e3b;
  --muted:        #6b8fa3;
  --danger:       #e53e3e;
  --success:      #2f9e44;
  --radius:       8px;
  --shadow:       0 1px 3px rgba(9,54,83,.10), 0 4px 16px rgba(9,54,83,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============================================================
   LOGIN VIEW
   ============================================================ */

#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--accent) 0%, var(--primary) 100%);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,.28);
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(15,133,169,.4);
}

.login-card h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,133,169,.14);
}

.btn-primary-full {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  margin-top: 8px;
  letter-spacing: .2px;
}

.btn-primary-full:hover { background: var(--primary-dark); }
.btn-primary-full:disabled { opacity: .6; cursor: not-allowed; }

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 18px;
}

/* ============================================================
   DASHBOARD VIEW
   ============================================================ */

#dashboard-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.dash-header {
  background: var(--accent);
  color: #fff;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.dash-logo {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .8px;
  flex-shrink: 0;
}

.dash-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  flex: 1;
}

.dash-user {
  font-size: 13px;
  color: rgba(255,255,255,.65);
}

.btn-logout {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-logout:hover { background: rgba(255,255,255,.20); }

/* Main area */
.dash-main {
  flex: 1;
  padding: 32px 28px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Section */
.dash-section {
  margin-bottom: 44px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-icon {
  font-size: 20px !important;
}

.clients-icon  { color: var(--primary); }
.prospects-icon { color: var(--muted); }

.section-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
}

.prospects-section .section-header h2 { color: var(--muted); }

.section-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  line-height: 1.6;
}

.prospects-badge { background: var(--muted); }

/* ============================================================
   TABLE
   ============================================================ */

.app-table-wrap {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
}

.app-table thead th {
  background: var(--bg);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .55px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.app-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.app-table tbody tr:last-child { border-bottom: none; }
.app-table tbody tr:hover { background: #f0f8fc; }

.app-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* App identity cell */
.app-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.app-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.app-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.app-proj {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Table action buttons */
.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
  border: none;
  line-height: 1;
}

.tb-primary {
  background: var(--primary);
  color: #fff;
}
.tb-primary:hover { background: var(--primary-dark); color: #fff; }

.tb-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.tb-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(15,133,169,.05); }
.tb-outline.copied { border-color: var(--success); color: var(--success); }

.tb-btn.icon-only { padding: 7px 9px; }
.tb-na { color: var(--muted); font-size: 13px; }

.material-icons-round {
  font-size: 16px !important;
  vertical-align: middle;
  line-height: 1;
}

/* Status / empty cells */
.td-status {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 14px;
}
.td-error { color: var(--danger); }

/* ============================================================
   LIGHTBOX
   ============================================================ */

#lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,36,58,.90);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
  padding: 16px;
}

#lb-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.lb-dialog {
  background: var(--accent);
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 920px;
  max-height: 93vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 96px rgba(0,0,0,.6);
}

/* Lightbox header */
.lb-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  flex-shrink: 0;
}

#lb-title {
  flex: 1;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}

#lb-close {
  background: rgba(255,255,255,.10);
  border: none;
  color: #fff;
  border-radius: 7px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}
#lb-close:hover { background: rgba(255,255,255,.22); }
#lb-close .material-icons-round { font-size: 18px !important; }

/* Lightbox body (image area) */
.lb-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000e18;
  min-height: 260px;
  overflow: hidden;
}

#lb-spinner {
  color: rgba(255,255,255,.55);
  font-size: 14px;
}

#lb-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-img {
  max-width: calc(100% - 96px);
  max-height: 62vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

/* Nav buttons */
.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  z-index: 10;
}
.lb-nav-btn:hover { background: rgba(255,255,255,.30); }
.lb-nav-btn:disabled { opacity: .2; cursor: default; }
.lb-nav-btn .material-icons-round { font-size: 24px !important; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* Lightbox footer */
.lb-footer {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.10);
  flex-shrink: 0;
  gap: 16px;
}

#lb-counter {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  flex: 1;
}

#lb-zip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
#lb-zip-btn:hover { background: var(--primary-light); }
#lb-zip-btn:disabled { opacity: .55; cursor: not-allowed; }
#lb-zip-btn .material-icons-round { font-size: 17px !important; }

.lb-err {
  color: rgba(255,255,255,.55);
  font-size: 14px;
  padding: 40px;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .dash-main { padding: 20px 16px; }
  .dash-header { padding: 0 16px; }
  .dash-user { display: none; }
  .col-url { display: none; }
  .app-table tbody td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .login-card { padding: 36px 24px 32px; }
  .dash-title { font-size: 14px; }
  .btn-logout span:not(.material-icons-round) { display: none; }
  #lb-img { max-width: calc(100% - 80px); }
}
