* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #f5f5f5; color: #1a1a1a; }

/* LOGIN */
#login-screen { display: flex; align-items: center; justify-content: center; height: 100vh; background: #f5f5f5; }
.login-box { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 40px; width: 360px; text-align: center; }
.login-box h1 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.login-box p { font-size: 13px; color: #888; margin-bottom: 24px; }
.login-box input { display: block; width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.login-box button { width: 100%; padding: 10px; background: #1D9E75; color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; margin-bottom: 12px; }
.login-box button:hover { background: #0F6E56; }
.login-box span { font-size: 13px; color: #1D9E75; cursor: pointer; }
.error { color: #e24b4a; font-size: 13px; margin-top: 8px; }
.success { color: #1D9E75; font-size: 13px; margin-top: 8px; }

/* LAYOUT */
#app { display: flex; height: 100vh; }
.sidebar { width: 200px; background: #fff; border-right: 1px solid #e0e0e0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { padding: 16px; border-bottom: 1px solid #e0e0e0; }
.logo-text { font-size: 16px; font-weight: 600; }
.logo-user { font-size: 12px; color: #888; margin-top: 2px; }
.nav-item { padding: 10px 16px; font-size: 13px; color: #666; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: #f5f5f5; color: #1a1a1a; }
.nav-item.active { color: #1D9E75; border-left-color: #1D9E75; font-weight: 500; background: #f0faf6; }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid #e0e0e0; }
.sidebar-footer button { width: 100%; padding: 8px; font-size: 13px; border: 1px solid #ddd; border-radius: 8px; background: transparent; cursor: pointer; }
.sidebar-footer button:hover { background: #f5f5f5; }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.view.active { display: flex; }
.topbar { padding: 12px 20px; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; justify-content: space-between; background: #fff; }
.topbar-title { font-size: 15px; font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-actions input { padding: 7px 12px; font-size: 13px; border: 1px solid #ddd; border-radius: 8px; width: 200px; }
.topbar-actions button { padding: 7px 14px; font-size: 13px; background: #1D9E75; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.topbar-actions button:hover { background: #0F6E56; }

/* STATS */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e0e0e0; background: #fff; }
.stat { background: #f5f5f5; border-radius: 8px; padding: 12px; }
.stat-label { font-size: 11px; color: #888; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 600; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 10px 16px; text-align: left; font-size: 11px; color: #888; font-weight: 500; text-transform: uppercase; border-bottom: 1px solid #e0e0e0; background: #fff; position: sticky; top: 0; }
.data-table td { padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.data-table tr:hover td { background: #fafafa; }
.table-wrap { flex: 1; overflow-y: auto; }

/* BADGES */
.badge { display: inline-flex; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-green { background: #EAF3DE; color: #3B6D11; }
.badge-amber { background: #FAEEDA; color: #854F0B; }
.badge-gray { background: #f0f0f0; color: #555; }
.badge-blue { background: #E6F1FB; color: #185FA5; }
.badge-red { background: #FCEBEB; color: #A32D2D; }

/* BUTTONS */
.btn-sm { padding: 5px 10px; font-size: 12px; border: 1px solid #ddd; border-radius: 6px; background: transparent; cursor: pointer; margin-right: 4px; }
.btn-sm:hover { background: #f5f5f5; }
.btn-danger { border-color: #e24b4a; color: #e24b4a; }
.btn-danger:hover { background: #FCEBEB; }

/* KANBAN */
.kanban { display: flex; gap: 12px; padding: 16px 20px; overflow-x: auto; flex: 1; }
.kanban-col { min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.kanban-header { font-size: 12px; font-weight: 500; color: #666; padding: 6px 10px; background: #f0f0f0; border-radius: 8px; display: flex; justify-content: space-between; }
.kanban-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px 12px; font-size: 13px; cursor: pointer; }
.kanban-card:hover { border-color: #1D9E75; }
.kanban-card .card-name { font-weight: 500; margin-bottom: 4px; }
.kanban-card .card-phone { font-size: 11px; color: #888; }

/* FORM CARD */
.form-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 24px; margin: 20px; max-width: 500px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: #888; margin-bottom: 5px; }
.form-row input, .form-row select { width: 100%; padding: 9px 12px; font-size: 13px; border: 1px solid #ddd; border-radius: 8px; }
.form-card button { padding: 9px 20px; background: #1D9E75; color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.form-card button:hover { background: #0F6E56; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 380px; }
.modal h3 { font-size: 16px; font-weight: 500; margin-bottom: 16px; }
.modal input, .modal select, .modal textarea { display: block; width: 100%; padding: 9px 12px; margin-bottom: 10px; font-size: 13px; border: 1px solid #ddd; border-radius: 8px; }
.modal textarea { height: 80px; resize: vertical; }
.modal-actions { display: flex; gap: 8px; margin-top: 8px; }
.modal-actions button { flex: 1; padding: 9px; font-size: 13px; border-radius: 8px; cursor: pointer; border: 1px solid #ddd; background: transparent; }
.modal-actions button:first-child { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.modal-actions button:first-child:hover { background: #0F6E56; }

.trial-banner {
  background: #7C3AED;
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.trial-banner-text { display: flex; align-items: center; gap: 8px; }
.trial-banner-days { font-weight: 500; }
.trial-banner button {
  background: #fff;
  color: #7C3AED;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.trial-banner button:hover { background: #f3f0ff; }