/* ============================================
   GLIPEARTE — Sistema de Contratos
   Paleta: creme/bege + azul-marinho + vibrante
   ============================================ */

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0d2240;
  --accent: #f4a100;
  --accent-light: #ffc84d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  --cream: #fdf8f0;
  --cream-dark: #f5eddc;
  --bg: #f0f4f8;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --border: #dde3eb;
  --shadow: 0 2px 12px rgba(26,58,92,.10);
  --shadow-md: 0 4px 24px rgba(26,58,92,.15);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 250px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.logo-mark {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.logo-name {
  font-family: 'Pacifico', cursive;
  font-size: 20px;
  color: var(--accent-light);
  line-height: 1;
}

.logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
  font-weight: 500;
}

.nav-item i { width: 18px; text-align: center; }

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}

.nav-item.active {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 20px;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
}

/* ===== TOPBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 90;
  box-shadow: var(--shadow);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--primary);
  padding: 4px 8px;
}

.page-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: 64px;
  padding: 28px;
  flex: 1;
  min-height: calc(100vh - 64px);
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2, .card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }
.card-body.p0 { padding: 0; }

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--primary);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--primary);
  font-size: 14px;
  transition: all .2s;
  text-align: left;
}

.quick-action-btn i {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.quick-action-btn:hover, .quick-action-btn:focus {
  background: var(--primary);
  color: white;
}

.quick-action-btn.luxury {
  border-color: var(--accent);
  color: var(--accent);
}

.quick-action-btn.luxury:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.quick-action-btn.secondary {
  border-color: var(--success);
  color: var(--success);
}

.quick-action-btn.secondary:hover {
  background: var(--success);
  color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-state i { display: block; margin-bottom: 12px; opacity: .3; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  text-decoration: none;
}

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

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.btn-success:hover { background: #1e7e34; border-color: #1e7e34; }

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

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover { background: #b02a37; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { padding: 6px 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== PAGE ACTIONS ===== */
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex: 1;
  max-width: 320px;
}

.search-box i { color: var(--text-muted); }
.search-box input {
  border: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  background: transparent;
}

/* ===== DATA TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--cream-dark);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }

.empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-primary { background: var(--primary); color: white; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: var(--primary-dark); }
.badge-danger { background: var(--danger); color: white; }
.badge-info { background: var(--info); color: white; }
.badge-secondary { background: var(--text-muted); color: white; }
.badge-accent { background: var(--accent); color: var(--primary-dark); }

/* ===== FORMS ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  transition: border-color .2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,90,140,.1);
}

.form-group textarea { resize: vertical; }

.input-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-prefix span {
  background: var(--cream-dark);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  border-right: 1.5px solid var(--border);
}

.input-prefix input {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 10px 12px;
}

.input-prefix input:focus { box-shadow: none; }

.input-prefix.readonly input { background: var(--cream); color: var(--text-muted); }

/* ===== WIZARD ===== */
.form-wizard {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wizard-steps {
  display: flex;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  transition: all .3s;
}

.wizard-step.active .step-circle {
  background: var(--primary);
  color: white;
}

.wizard-step.completed .step-circle {
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.wizard-step.active .step-label { color: var(--primary); }
.wizard-step.completed .step-label { color: var(--success); }

.wizard-divider {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
  margin: 0 4px;
  margin-bottom: 18px;
}

.wizard-content { padding: 28px; }
.wizard-content.hidden { display: none; }

.step-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.step-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===== CONTRACT TYPE CARDS ===== */
.contract-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.contract-type-card {
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  text-align: center;
}

.contract-type-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contract-type-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0f6ff, #e8f0ff);
}

.contract-type-card.luxury {
  background: linear-gradient(135deg, #fffdf0, #fff8e0);
}

.contract-type-card.luxury.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff8e0, #fff0c0);
}

.contract-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.contract-type-icon { font-size: 40px; margin-bottom: 12px; }

.contract-type-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.contract-type-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.item-list {
  list-style: none;
  text-align: left;
  margin-bottom: 16px;
}

.item-list li {
  font-size: 13px;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.item-list li i {
  color: var(--success);
  font-size: 11px;
}

.contract-type-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===== VALUES ===== */
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.value-card .card-header { background: var(--cream); }
.value-card .badge { background: var(--accent); color: var(--primary-dark); }

.reposicao-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.reposicao-item:last-child { border-bottom: none; }

.reposicao-item label {
  font-size: 13px;
  color: var(--text);
  flex: 1;
}

.reposicao-item .input-reposicao {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: 130px;
  flex-shrink: 0;
}

.reposicao-item .input-reposicao span {
  background: var(--cream-dark);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  border-right: 1px solid var(--border);
}

.reposicao-item .input-reposicao input {
  flex: 1;
  border: none;
  padding: 6px 8px;
  font-size: 13px;
  width: 80px;
  outline: none;
}

/* ===== CONTRACT PREVIEW ===== */
.contract-preview-container {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 70vh;
  background: var(--cream);
  padding: 20px;
}

.contract-preview {
  background: white;
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 60px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  font-family: 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.7;
  color: #111;
}

.cp-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 20px;
}

.cp-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.cp-logo-circle {
  width: 60px;
  height: 60px;
  background: #1a3a5c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #f4a100;
}

.cp-company-name {
  font-family: 'Pacifico', cursive;
  font-size: 26px;
  color: #1a3a5c;
}

.cp-company-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #666;
}

.cp-title {
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 14px;
  color: #1a3a5c;
}

.cp-subtitle {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.cp-numero {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

.cp-section {
  margin-bottom: 20px;
}

.cp-clause-title {
  font-weight: bold;
  text-transform: uppercase;
  color: #1a3a5c;
  margin-bottom: 8px;
  font-size: 13px;
  margin-top: 20px;
}

.cp-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #f9f6f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.cp-party h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 8px;
}

.cp-party p { font-size: 13px; margin-bottom: 3px; }
.cp-party strong { color: #1a3a5c; }

.cp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
}

.cp-table th {
  background: #1a3a5c;
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
}

.cp-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
}

.cp-table tr:nth-child(even) td { background: #f9f6f0; }

.cp-highlight-box {
  background: #f9f6f0;
  border-left: 4px solid #1a3a5c;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
}

.cp-value-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dotted #ddd;
}

.cp-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.cp-signature-block {
  text-align: center;
}

.cp-signature-line {
  height: 1px;
  background: #333;
  margin: 40px 0 8px;
}

.cp-signature-img {
  display: block;
  max-height: 80px;
  margin: 0 auto;
  margin-bottom: 4px;
}

.cp-signature-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #666;
}

.cp-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
  font-size: 11px;
  color: #888;
}

/* ===== REVIEW ACTIONS ===== */
.review-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

/* ===== EXISTING CLIENT ===== */
.existing-client-section {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  grid-column: 1 / -1;
}

.existing-client-section label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}

.client-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.client-select-row select {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: white;
  min-width: 200px;
}

.or-divider {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== FORM SECTION ===== */
.form-section {
  display: grid;
  gap: 0;
}

.form-section .existing-client-section + .form-grid {
  margin-top: 0;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-large { max-width: 760px; }
.modal-fullscreen { max-width: 900px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* ===== SIGNATURE ===== */
.signature-wrapper {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream);
  display: flex;
  justify-content: center;
}

#signatureCanvas {
  cursor: crosshair;
  display: block;
  max-width: 100%;
  touch-action: none;
}

.signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

/* ===== TOPBAR ACTIONS ===== */
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ===== MISC ===== */
.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.mt10 { margin-top: 10px; }
.mt20 { margin-top: 20px; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
  display: none;
}

.sidebar-overlay.hidden { display: none; }
.sidebar-overlay.visible { display: block; }

/* ===== SIGNATURE CANVAS RESPONSIVE ===== */
@media (max-width: 700px) {
  #signatureCanvas {
    width: 100% !important;
    height: 150px !important;
  }
  .signature-wrapper canvas {
    width: 100%;
  }
}

/* ===== RECENT CONTRACTS LIST ===== */
.recent-contract-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.recent-contract-item:last-child { border-bottom: none; }

.rci-info { flex: 1; }
.rci-name { font-weight: 600; font-size: 14px; color: var(--text); }
.rci-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .topbar {
    left: 0;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle { display: block; }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .contract-type-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full {
    grid-column: 1;
  }

  .cp-parties {
    grid-template-columns: 1fr;
  }

  .cp-signatures {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .main-content { padding: 16px; }
  .wizard-content { padding: 20px; }
  .contract-preview { padding: 28px 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
