*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       background: #f8fafc; color: #1e293b; line-height: 1.6; }

/* Nav */
nav { background: #1a1a2e; padding: 0 2rem; display: flex;
      align-items: center; justify-content: space-between; height: 56px; }
nav .brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
nav a { color: #94a3b8; text-decoration: none; font-size: .9rem; margin-left: 1.5rem; }
nav a:hover { color: #fff; }

/* Layout */
.container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; }
.page-header p  { color: #64748b; margin-top: .35rem; }

/* Cards */
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
        padding: 1.75rem; margin-bottom: 1.25rem; }
.card h2 { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin-bottom: 1.25rem;
           padding-bottom: .6rem; border-bottom: 1px solid #f1f5f9; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .82rem; font-weight: 600;
        color: #475569; margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; padding: .55rem .75rem; font-size: .9rem; font-family: inherit;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b;
  transition: border .15s; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.25rem;
       border: none; border-radius: 6px; font-size: .9rem; font-weight: 600;
       cursor: pointer; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .88; }
.btn-primary  { background: #2563eb; color: #fff; }
.btn-success  { background: #16a34a; color: #fff; }
.btn-danger   { background: #dc2626; color: #fff; }
.btn-ghost    { background: #f1f5f9; color: #475569; }
.btn-sm       { padding: .35rem .75rem; font-size: .8rem; }
.btn-full     { width: 100%; justify-content: center; }

/* Badge */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px;
         font-size: .72rem; font-weight: 600; }
.badge-draft    { background: #fef9c3; color: #854d0e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-sent     { background: #dbeafe; color: #1e40af; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; padding: .6rem .75rem; font-size: .75rem; font-weight: 700;
     color: #64748b; text-transform: uppercase; letter-spacing: .05em;
     border-bottom: 2px solid #e2e8f0; }
td { padding: .65rem .75rem; border-bottom: 1px solid #f1f5f9; color: #334155; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Alert */
.alert { padding: .85rem 1rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1rem; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* Spinner */
.spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35);
           border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading .spinner { display: inline-block; }
.loading .btn-label { display: none; }

/* Misc */
.empty-state { text-align: center; padding: 2.5rem; color: #94a3b8; }
.actions { display: flex; gap: .5rem; align-items: center; }
@media(max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
