/* Clean, professional dark design — aidramatool.shop */
:root {
  color-scheme: dark;
  --bg-canvas: #0e0f12;
  --bg-surface: #14161b;
  --bg-elevated: #1b1d24;
  --bg-input: #111216;
  
  --accent-orange: #ea580c;
  --accent-orange-hover: #c2410c;
  --accent-orange-subtle: rgba(234, 88, 12, 0.12);
  
  --border-line: #242631;
  --border-focus: #ea580c;
  
  --text-head: #f3f4f6;
  --text-body: #d1d5db;
  --text-muted: #8b929e;
  
  --status-pending: #d97706;
  --status-verified: #059669;
  --status-delivered: #2563eb;
  --status-rejected: #dc2626;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  background-color: var(--bg-canvas);
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-body);
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

section, .section, main {
  background-color: var(--bg-canvas);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Headings & Text */
h1, h2, h3, h4, h5 {
  color: var(--text-head);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: 12px; }
h3 { font-size: 1.1rem; margin-bottom: 6px; }

p { color: var(--text-body); }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.text-orange { color: var(--accent-orange); }

a {
  color: var(--accent-orange);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background-color: var(--bg-input);
  border: 1px solid var(--border-line);
  color: var(--text-head);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

::selection {
  background-color: rgba(234, 88, 12, 0.35);
  color: #ffffff;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-line);
  gap: 10px;
}

.brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-head);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-tag {
  background-color: var(--accent-orange-subtle);
  color: var(--accent-orange);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-head);
}

@media (max-width: 480px) {
  .brand-tag {
    display: none;
  }
  .brand {
    font-size: 0.92rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: #ffffff;
}

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

.btn-outline {
  background-color: transparent;
  border-color: var(--border-line);
  color: var(--text-head);
}

.btn-outline:hover {
  background-color: var(--bg-elevated);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: transparent;
  border-color: #ef4444;
  color: #ef4444;
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Cards & Layout */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-line);
}

.section-head {
  margin-bottom: 24px;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .section {
    padding: 28px 0;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card {
    padding: 16px;
  }
  .form-input, .form-select, .form-textarea {
    font-size: 16px;
  }
}

/* Workspace layout tokens */
.ws-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}
.ws-layout > * {
  min-width: 0;
}
@media (max-width: 860px) {
  .ws-layout {
    grid-template-columns: 1fr;
  }
}
.project-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-line);
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: var(--text-body);
  background-color: var(--bg-surface);
}
.project-item.active {
  border-color: var(--accent-orange);
  background-color: var(--bg-elevated);
  color: #ffffff;
}
.ref-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-width: 0;
}
.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
}
.tab-btn.active {
  color: var(--text-head);
  border-bottom-color: var(--accent-orange);
}

/* Badges & Status */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-line);
  color: var(--text-muted);
}

.badge-pending {
  background-color: rgba(217, 119, 6, 0.12);
  color: #f59e0b;
  border-color: rgba(217, 119, 6, 0.35);
}
.badge-verified {
  background-color: rgba(5, 150, 105, 0.12);
  color: #10b981;
  border-color: rgba(5, 150, 105, 0.35);
}
.badge-delivered {
  background-color: rgba(234, 88, 12, 0.12);
  color: var(--accent-orange);
  border-color: rgba(234, 88, 12, 0.35);
}
.badge-rejected {
  background-color: rgba(220, 38, 38, 0.12);
  color: #ef4444;
  border-color: rgba(220, 38, 38, 0.35);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-head);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  color: var(--text-head);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-line);
}

th {
  background-color: var(--bg-elevated);
  color: var(--text-head);
  font-weight: 600;
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background-color: var(--bg-surface);
}

.faq-q {
  width: 100%;
  padding: 14px 18px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-head);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-a {
  padding: 0 18px 14px 18px;
  color: var(--text-body);
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

.faq-item.active .faq-a {
  display: block;
}

/* Notices & Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-line);
  color: var(--text-head);
}

.alert-warning {
  border-left: 3px solid var(--status-pending);
}

.alert-info {
  border-left: 3px solid var(--accent-orange);
}

.alert-success {
  border-left: 3px solid var(--status-verified);
}

.alert-danger {
  border-left: 3px solid var(--status-rejected);
  color: var(--text-head);
}

/* Footer */
.footer {
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-line);
}
