/* =========================================================
 * ReelSmith - Came4Chaos Tenant Styles
 * ========================================================= */

/* -------------------------
 * Theme Variables
 * ------------------------- */
:root {
  --primary: #2f6fed;
  --primary-hover: #1f57c9;

  --bg: #f6f7f9;
  --panel: #ffffff;
  --border: #e6e8ee;
  --text: #1b1f2a;
  --muted: #6b7280;
}

/* -------------------------
 * Reset
 * ------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans TC", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* -------------------------
 * Layout
 * ------------------------- */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.tenant-info {
  font-size: 0.875rem;
  color: var(--muted);
}

.tenant-name {
  font-weight: 600;
  color: var(--primary);
}

.main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* -------------------------
 * Components
 * ------------------------- */
.section {
  margin-bottom: 2rem;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.card p {
  margin: 0.5rem 0;
  color: var(--text);
}

.card ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.card li {
  margin: 0.5rem 0;
}

code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
}

/* -------------------------
 * Buttons
 * ------------------------- */
.btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #fafafa;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -------------------------
 * Results
 * ------------------------- */
.result {
  margin-top: 1rem;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.result:empty {
  display: none;
}

/* -------------------------
 * Utilities
 * ------------------------- */
.hidden {
  display: none !important;
}

/* -------------------------
 * Responsive
 * ------------------------- */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .main {
    padding: 1rem;
  }
}
