/* Portal app pages — TOORCE light theme (white / red / black) */
body.t-app {
  background: var(--t-white);
  color: var(--t-ink);
}

body.t-app .t-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--t-border);
}

body.t-app .t-card {
  background: var(--t-white);
  border: 1px solid var(--t-border);
  box-shadow: var(--t-shadow);
}

body.t-app .t-table-wrap {
  border: 1px solid var(--t-border);
}

body.t-app .t-table th,
body.t-app .t-table td {
  color: var(--t-ink);
  border-bottom-color: var(--t-border);
}

body.t-app .t-table th {
  background: var(--t-gray-50);
  color: var(--t-gray-600);
}

body.t-app .t-section-title {
  color: var(--t-ink);
}

body.t-app .t-section-label {
  color: var(--t-red);
}

body.t-app .t-page-head h1 {
  color: var(--t-ink);
}

body.t-app .t-page-head p {
  color: var(--t-gray-600);
}

body.t-app .t-main {
  padding-top: 36px;
}

body.t-app .t-feature-card p {
  color: var(--t-gray-600);
}

body.t-app code {
  background: var(--t-red-soft);
  color: var(--t-red);
}

body.t-app .t-table select {
  background: var(--t-white);
  color: var(--t-ink);
  border: 1px solid var(--t-border);
}

body.t-app .t-btn-ghost {
  color: var(--t-gray-600);
  border: 1px solid var(--t-border);
  background: transparent;
}

body.t-app .t-btn-ghost:hover {
  color: var(--t-red);
  border-color: var(--t-red);
}

body.t-app .t-user-badge {
  color: var(--t-gray-600);
  border-color: var(--t-border);
}

body.t-app .t-company-panel {
  border: 1px solid var(--t-border);
  background: var(--t-gray-50);
}

body.t-app .t-company-panel p {
  color: var(--t-gray-600);
}

body.t-app .t-select {
  color: var(--t-ink);
  background: var(--t-white);
  border: 1px solid var(--t-border);
  width: 100%;
  padding: 13px 14px;
  font-family: inherit;
}

body.t-app .t-dialog {
  border: 1px solid var(--t-border);
  background: var(--t-white);
  color: var(--t-ink);
}

body.t-app .t-footer {
  background: var(--t-gray-50);
  border-top: 1px solid var(--t-border);
  color: var(--t-ink);
}

.t-page-head {
  margin-bottom: 32px;
}

.t-page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.t-page-head p {
  margin: 0;
  color: var(--t-gray-600);
  max-width: 640px;
}

.t-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.t-feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.t-feature-card p {
  flex: 1;
  color: var(--t-gray-500);
  margin: 0;
}

.t-partner-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.t-partner-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--t-border);
  background: var(--t-white);
  color: var(--t-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.t-partner-nav a:hover,
.t-partner-nav a.is-active {
  border-color: var(--t-red);
  color: var(--t-red);
  box-shadow: 0 8px 24px rgba(209, 17, 17, 0.08);
}

.t-auth-wrap {
  max-width: 460px;
  margin: 0 auto;
}

.t-auth-card {
  padding: 36px;
}

.t-user-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-gray-400);
  padding: 8px 12px;
  border: 1px solid var(--t-border-dark);
}

.t-installer-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

@media (max-width: 960px) {
  .t-installer-grid {
    grid-template-columns: 1fr;
  }
}

.t-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

code {
  font-family: var(--t-mono);
  font-size: 0.88em;
  background: var(--t-red-soft);
  color: var(--t-red);
  padding: 2px 6px;
}

.t-table select {
  padding: 8px 10px;
  background: var(--t-white);
  color: var(--t-ink);
  border: 1px solid var(--t-border);
  font-family: inherit;
  font-size: 0.85rem;
}

.t-table button {
  margin-left: 8px;
  padding: 6px 12px;
  font-size: 0.65rem;
}

.t-table-actions {
  white-space: nowrap;
}

.t-btn-sm {
  padding: 6px 12px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.t-company-panel {
  border: 1px solid var(--t-border);
  margin-bottom: 20px;
  padding: 20px;
  background: var(--t-gray-50);
}

.t-company-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.t-company-panel h3 {
  margin: 6px 0;
  font-size: 1.15rem;
  color: var(--t-ink);
}

.t-company-panel p {
  margin: 4px 0;
  color: var(--t-gray-600);
  font-size: 0.9rem;
}

.t-company-code {
  font-family: var(--t-mono);
  color: var(--t-red);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.t-company-admin-line {
  margin-top: 8px !important;
}

.t-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t-status-pill.active {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.t-status-pill.inactive {
  color: var(--t-red);
  background: var(--t-red-soft);
}

.t-status-pill.pending {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
}

.t-status-pill.approved {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.t-status-pill.rejected {
  color: var(--t-red);
  background: var(--t-red-soft);
}

.t-status-pill.revoked,
.t-status-pill.revoke-pending {
  color: #6b21a8;
  background: rgba(147, 51, 234, 0.12);
}

.t-req-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--t-gray-600);
}

.t-dialog {
  border: 1px solid var(--t-border);
  border-radius: 12px;
  background: var(--t-white);
  color: var(--t-ink);
  padding: 24px;
  max-width: 560px;
  width: calc(100% - 32px);
}

.t-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.t-dialog h3 {
  margin: 0 0 20px;
  color: var(--t-ink);
}

.t-guide {
  line-height: 1.75;
  color: var(--t-gray-600);
}

.t-guide h2 {
  margin: 32px 0 12px;
  font-size: 1.15rem;
  color: var(--t-ink);
}

.t-guide h2:first-child {
  margin-top: 0;
}

.t-guide h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
  color: var(--t-ink);
}

.t-guide p {
  margin: 0 0 12px;
}

.t-guide ul,
.t-guide ol {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

.t-guide li {
  margin-bottom: 6px;
}

.t-guide a {
  color: var(--t-red);
  font-weight: 600;
}

.t-guide code,
.t-guide .t-guide-path {
  font-family: var(--t-mono);
  font-size: 0.85em;
  background: var(--t-gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--t-ink);
}

.t-guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.9rem;
}

.t-guide-table th,
.t-guide-table td {
  border: 1px solid var(--t-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.t-guide-table th {
  background: var(--t-gray-50);
  color: var(--t-ink);
  font-weight: 700;
}

.t-guide-callout {
  border-left: 3px solid var(--t-red);
  background: var(--t-red-soft);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}

.t-guide-toc {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.t-guide-toc a {
  text-decoration: none;
}

.t-guide-toc a:hover {
  text-decoration: underline;
}

.t-guide-table-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
}

.t-guide-table-wrap .t-guide-table {
  margin: 0;
  min-width: 720px;
}

.t-guide-table td code {
  white-space: nowrap;
}
