/* ================================================================
   i-Luxury.com – Modern CSS
   Replaces: main.css, inline styles scattered across all .asp files
   ================================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --navy:       #000099;
  --navy-light: #84BED1;
  --teal:       #99CCCC;
  --teal-dark:  #598A93;
  --gainsboro:  #DCDCDC;
  --silver:     #C0C0C0;
  --red:        #CC0000;
  --green:      #007700;
  --white:      #FFFFFF;
  --text:       #111111;

  --font-base: 'Arial', 'Helvetica Neue', sans-serif;
  --radius: 4px;
  --shadow: 0 1px 4px rgba(0,0,0,0.12);

  --header-h: 56px;
}

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
}

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

h1,h2,h3 { color: var(--navy); margin-top: 0; }

/* ── Layout ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  height: var(--header-h);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.header-brand { display: flex; align-items: center; gap: 12px; }
.header-brand .logo { height: 36px; }
.header-tagline { font-size: 12px; color: var(--teal); }

.header-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-nav a {
  color: var(--white); font-size: 13px; font-weight: 600;
  padding: 4px 8px; border-radius: var(--radius);
  transition: background 0.15s;
}
.header-nav a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.welcome { color: var(--teal); font-size: 12px; }

.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  min-height: calc(100vh - var(--header-h) - 80px);
}

.site-footer {
  background: var(--gainsboro);
  border-top: 1px solid var(--silver);
  text-align: center;
  padding: 12px 20px;
  font-size: 11px;
  color: #555;
}
.site-footer .copyright { margin: 4px 0 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: var(--font-base);
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-primary   { background: var(--navy);  color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: #0000cc; text-decoration: none; color: var(--white); }
.btn-secondary { background: var(--gainsboro); color: var(--text); border-color: var(--silver); }
.btn-secondary:hover { background: var(--silver); text-decoration: none; }
.btn-outline   { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-sm        { padding: 3px 10px; font-size: 12px; }
.btn-full      { width: 100%; }
.btn-help      {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--silver); border: none;
  font-size: 11px; font-weight: 700; cursor: pointer;
  vertical-align: middle; margin-left: 4px;
}

/* ── Forms ── */
.form-group  { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.form-row    { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

label { font-size: 13px; font-weight: 600; color: var(--navy); }

.form-control {
  padding: 6px 10px;
  border: 1px solid #bbb;
  border-radius: var(--radius);
  font-size: 13px; font-family: var(--font-base);
  width: 100%;
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(0,0,153,.15); }
.form-control-sm { width: 120px; }
.form-static { font-size: 14px; font-weight: 600; line-height: 32px; }
.form-check  { flex-direction: row; align-items: center; gap: 8px; }

.field-error { color: var(--red); font-size: 12px; }

.range-pair  { display: flex; align-items: center; gap: 6px; }
.range-pair select { flex: 1; }
.range-pair span { font-weight: 600; color: #888; }

/* ── Alerts ── */
.alert {
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: 13px;
}
.alert-success { background: #e8f5e9; border: 1px solid #66bb6a; color: #2e7d32; }
.alert-error   { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }

.results-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.results-table th {
  background: var(--gainsboro);
  color: var(--navy);
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid var(--silver);
  white-space: nowrap;
}
.results-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.results-table tbody tr:hover { background: #f0f4ff; }
.results-table tbody tr:nth-child(even) { background: #fafafa; }
.results-table tbody tr:nth-child(even):hover { background: #f0f4ff; }
.results-table tfoot td { font-weight: 700; background: var(--gainsboro); }
.results-table .num   { text-align: right; font-variant-numeric: tabular-nums; }
.results-table .center { text-align: center; }
.results-table .price { font-weight: 700; color: var(--navy); }

.status-in  { color: var(--green); font-weight: 700; }
.status-out { color: #888; }

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; margin-top: 16px;
}
.page-info { font-size: 13px; color: #555; padding: 0 8px; }

/* ── Search Form ── */
.search-form {
  background: var(--gainsboro);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}
.search-grid {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.search-field        { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.search-field-double { min-width: 240px; }
.search-actions      { flex-direction: row; gap: 8px; align-self: flex-end; padding-top: 20px; }

/* ── Results header ── */
.results-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 13px; color: #555;
}
.no-results {
  text-align: center; padding: 40px;
  background: var(--gainsboro); border-radius: var(--radius);
  color: var(--navy);
}

/* ── Diamond Detail ── */
.detail-page { max-width: 1100px; }
.detail-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 700px) {
  .detail-layout { grid-template-columns: 1fr; }
}

.detail-specs {
  background: #f9f9f9;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
}
.detail-specs h2 { display: none; } /* title is in detail-header */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th {
  color: var(--navy);
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
  width: 45%;
  background: transparent;
}
.spec-table td {
  color: #333;
  padding: 8px 12px;
  border-bottom: 1px solid #e0e0e0;
  background: transparent;
}
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: none; }

.cert-link { margin-top: 12px; }

.detail-request { background: #f9f9f9; padding: 20px; border-radius: var(--radius); border: 1px solid #ddd; }
.detail-request h3 { margin-bottom: 16px; }

.detail-image { text-align: center; margin-top: 24px; }
.detail-image img { max-width: 400px; width: 100%; border: 1px solid #ddd; border-radius: var(--radius); }

/* ── Employee Inventory Panel ── */
.inventory-panel {
  margin-top: 24px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 20px;
}
.inventory-panel h3 { margin-bottom: 12px; color: var(--navy); }
.inventory-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inventory-table th {
  background: var(--navy);
  color: var(--white);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}
.inventory-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}
.inventory-table tbody tr:last-child td { border-bottom: none; }
.inventory-table tbody tr:hover { background: #f0f4f8; }

/* ── Profile ── */
.profile-section {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.profile-section h3 { margin-bottom: 16px; }

.pw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pw-table th, .pw-table td {
  padding: 8px 10px;
  border: 1px solid #ddd;
  text-align: center;
}
.pw-table th { background: var(--gainsboro); }

.help-box {
  background: #fffde7; border: 1px solid #f9a825;
  border-radius: var(--radius); padding: 12px;
  margin-bottom: 12px; font-size: 13px;
}

/* ── Invoices / Memos ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; font-size: 13px;
}
.balance-banner {
  background: #e3f2fd; border: 1px solid #90caf9;
  border-radius: var(--radius); padding: 10px 14px;
  margin-bottom: 16px; font-size: 13px;
}
.empty-state {
  text-align: center; padding: 32px;
  color: #777; font-size: 14px;
}

/* ── Tab bar ── */
.tab-bar { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--navy); }
.tab {
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  color: var(--navy); border: 1px solid #ddd; border-bottom: none;
  background: var(--gainsboro); border-radius: var(--radius) var(--radius) 0 0;
  margin-right: 4px;
}
.tab:hover { background: var(--silver); text-decoration: none; }
.tab-active { background: var(--white); border-bottom: 2px solid var(--white); }

/* ── Login ── */
body.login-body {
  background: linear-gradient(135deg, #000066 0%, #000099 50%, #003399 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.login-container {
  width: 100%; max-width: 400px;
  padding: 24px;
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 60px; }
.login-logo h1 { color: var(--white); font-size: 28px; margin: 8px 0 4px; }
.login-tagline { color: var(--teal); font-size: 13px; }

.login-card {
  background: var(--white);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.login-card .form-group { margin-bottom: 18px; }
.login-card .btn-primary { margin-top: 8px; }

.login-footer {
  text-align: center; margin-top: 20px;
  color: rgba(255,255,255,0.7); font-size: 12px;
}
.login-footer a { color: var(--teal); }

/* ── Terms ── */
.terms-page { max-width: 700px; }
.terms-text ol { line-height: 1.8; font-size: 14px; color: var(--navy); }
.terms-actions { margin-top: 24px; display: flex; gap: 12px; }

/* ── Error ── */
.error-page { text-align: center; padding: 60px 20px; }
.error-banner { max-width: 500px; margin: 60px auto; text-align: center; }

/* ── Sortable columns ── */
.sortable-table th.sort-col {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable-table th.sort-col:hover {
  background: var(--silver);
}
.sortable-table th.sort-col::after {
  content: ' ⇅';
  opacity: 0.35;
  font-size: 11px;
}
.sortable-table th.sort-col:hover::after {
  opacity: 0.7;
}
@media (max-width: 768px) {
  .site-header { flex-wrap: wrap; height: auto; padding: 12px; gap: 8px; }
  .header-nav  { gap: 10px; font-size: 12px; }
  .search-grid { flex-direction: column; }
  .search-field, .search-field-double { width: 100%; }
}
