﻿:root {
  --color-primary: #2563eb;
  --color-primary-strong: #1d4ed8;
  --color-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-border: #d1d5db;
  --color-muted: #6b7280;
  --color-danger: #dc2626;
  --radius: 10px;
  --shadow: 0 15px 30px -20px rgba(37, 99, 235, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--color-bg);
  color: #111827;
  min-height: 100vh;
}

h1, h2, h3 {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: #111827;
}

p {
  margin: 0;
  color: var(--color-muted);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand__meta h1 {
  font-size: 1.25rem;
}

.header-actions {
  display: flex;
  gap: 12px;
}

button {
  border-radius: 8px;
  border: 0;
  padding: 10px 16px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -16px rgba(37, 99, 235, 0.6);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

button.ghost {
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary-strong);
}

button.danger {
  background: var(--color-danger);
}

.app-shell {
  display: flex;
  gap: 24px;
  padding: 24px 32px 48px;
}

.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar__section {
  background: var(--color-surface);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__section h2 {
  font-size: 1rem;
}

.file-input {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary-strong);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  justify-content: center;
}

.file-input input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.reminder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reminder-item {
  padding: 12px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.reminder-item__title {
  font-weight: 600;
}

.reminder-item__meta {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.reminder-list__empty {
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.view {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.view--active {
  display: flex;
}

.view__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.view__actions {
  display: flex;
  gap: 12px;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  border-color: var(--color-primary);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px -24px rgba(17, 24, 39, 0.5);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
}

.form-grid label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #1f2937;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.full-width {
  grid-column: 1 / -1;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

thead {
  background: rgba(37, 99, 235, 0.08);
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

th {
  font-weight: 600;
  color: #1f2937;
}

tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}
.table-actions {
  text-align: right;
}

.empty-row td {
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge--baru {
  background: rgba(14, 165, 233, 0.2);
  color: #0ea5e9;
}

.badge--followup {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.badge--qualified {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge--closing {
  background: rgba(14, 116, 144, 0.2);
  color: #0f172a;
}

.badge--lost {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.activity-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.activity-status--overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.activity-status--due-today {
  background: rgba(245, 158, 11, 0.2);
  color: #c2410c;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px -24px rgba(37, 99, 235, 0.6);
}

.stat-card__value {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0;
}

.dashboard-notes ul {
  list-style: disc;
  padding-left: 20px;
  color: #1f2937;
}

.dashboard-notes li {
  margin-bottom: 6px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
  box-shadow: 0 20px 40px -24px rgba(17, 24, 39, 0.6);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  background: rgba(239, 68, 68, 0.95);
}

@media (max-width: 1024px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    gap: 16px;
  }

  .sidebar__section {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .sidebar {
    flex-direction: column;
  }

  table {
    min-width: unset;
  }

  .view__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
.muted {
  color: var(--color-muted);
  font-size: 0.85rem;
}

button.ghost.is-active {
  background: var(--color-primary);
  color: #fff;
}

.reminder-item__notes {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #334155;
}




@media (max-width: 600px) {
  .app-header {
    padding: 16px;
    gap: 12px;
  }

  .brand__logo {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .header-actions button {
    width: 100%;
  }

  .app-shell {
    padding: 16px;
    gap: 16px;
  }

  .sidebar {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }

  .sidebar__section {
    padding: 16px;
    width: 100%;
  }

  .content {
    gap: 16px;
  }

  .card {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .view__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .view__actions {
    width: 100%;
  }

  .view__actions > * {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .table-container {
    overflow: visible;
  }

  table {
    border: 0;
    min-width: 0;
  }

  table thead {
    display: none;
  }

  table tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  table tr {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 12px 30px -26px rgba(15, 23, 42, 0.6);
    padding: 8px 0;
  }

  table tr.empty-row {
    padding: 16px;
    text-align: center;
    box-shadow: none;
  }

  table tr.empty-row td {
    display: block;
    border-bottom: 0;
  }

  table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  table td:last-child {
    border-bottom: 0;
  }

  table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-muted);
  }

  table tr.empty-row td::before {
    content: none;
  }

  table td.table-actions {
    align-items: stretch;
  }

  table td.table-actions button {
    width: 100%;
  }

  .toast {
    left: 16px;
    right: 16px;
    width: auto;
  }
}



