/* Shipping Ninjas — Main Styles */

:root {
  --color-primary: #1D9E75;
  --color-primary-dark: #0F6E56;
  --color-background: #f5f5f5;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-secondary: #555555;
  --color-border: #e0e0e0;
  --color-danger: #A32D2D;
  --color-warning: #854F0B;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-background);
  color: var(--color-text);
  font-size: 14px;
}

/* App Layout */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 210px;
  min-width: 210px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.sidebar-logo {
  padding: 0 1rem 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.brand-sub {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 1rem;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-left: 2px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: var(--color-background);
  color: var(--color-text);
}

.nav-item.active {
  color: var(--color-text);
  background: #f0faf6;
  border-left-color: var(--color-primary);
  font-weight: 500;
}

.nav-item i {
  font-size: 16px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding-top: 0.5rem;
}

/* Main Content */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--color-background);
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}

/* Placeholder */
.placeholder {
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
}

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

.btn-primary {
  background: #e1f5ee;
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
  font-weight: 500;
}

.btn-primary:hover {
  background: #c8ede1;
}

.btn-danger {
  background: #fcebeb;
  border-color: var(--color-danger);
  color: var(--color-danger);
  font-weight: 500;
}

/* Cards */
.card {
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-header {
  padding: 10px 16px;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 1rem;
}

/* Tables */
.table-wrap {
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafafa;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 500;
}

.badge-open { background: #e6f1fb; color: #185fa5; }
.badge-held { background: #fcebeb; color: #a32d2d; }
.badge-dismissed { background: #f1efe8; color: #5f5e5a; }
.badge-fulfilled { background: #e1f5ee; color: #0f6e56; }
.badge-veeqo { background: #e1f5ee; color: #0f6e56; }
.badge-airtable { background: #faeeda; color: #854f0b; }

/* Stats Grid */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  padding: 0.875rem 1rem;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
}

.stat-value.green {
  color: var(--color-primary-dark);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

input, select, textarea {
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  align-items: center;
}

.filters input {
  flex: 1;
  height: 34px;
}

.filters select {
  height: 34px;
  min-width: 130px;
}
