:root{--3s-blue: #2563eb;--3s-blue-600: #1d4ed8;--3s-blue-50: #eff6ff;--3s-green: #10b981;--3s-green-700: #047857;--3s-green-50: #ecfdf5}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f5f6f8;color:#1f2328}.app{display:flex;min-height:100vh}.sidebar{width:240px;background:#1f2937;color:#e5e7eb;padding:18px 14px 120px;position:relative}.sidebar h1{font-size:18px;margin:0 0 18px}.sidebar h3{color:#9ca3af;font-size:11px;text-transform:uppercase;margin:18px 0 6px;letter-spacing:.06em}.sidebar button{display:block;width:100%;text-align:left;background:transparent;border:0;color:#d1d5db;padding:8px 10px;border-radius:6px;margin:1px 0;cursor:pointer;font-size:13px}.sidebar button:hover{background:#374151}.sidebar button.active{background:#2563eb;color:#fff}.sidebar button .count{float:right;opacity:.7;font-size:11px}.main{flex:1;padding:22px 28px;overflow:auto}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.toolbar input[type=text]{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;min-width:220px}.toolbar select{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;background:#fff}.toolbar .spacer{flex:1}button.btn{background:var(--3s-blue);color:#fff;border:0;padding:8px 14px;border-radius:6px;cursor:pointer;font-weight:500}button.btn:hover{background:var(--3s-blue-600)}button.btn.secondary{background:#fff;color:#1f2937;border:1px solid #d1d5db}button.btn.danger{background:#dc2626}button.btn.success{background:var(--3s-green)}button.btn.success:hover{background:var(--3s-green-700)}button.btn.ghost{background:transparent;color:var(--3s-blue);border:0;padding:4px 8px}table.contacts{width:100%;background:#fff;border-collapse:collapse;border-radius:10px;overflow:hidden;box-shadow:0 1px 2px #0000000d}table.contacts th,table.contacts td{padding:11px 14px;text-align:left;font-size:13px;border-bottom:1px solid #f1f3f5}table.contacts th{background:#f9fafb;color:#4b5563;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.04em}table.contacts tr:hover td{background:#f9fafb;cursor:pointer}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:500}.badge.gray{background:#e5e7eb;color:#374151}.badge.green{background:#d1fae5;color:#065f46}.badge.blue{background:#dbeafe;color:#1e40af}.badge.yellow{background:#fef3c7;color:#92400e}.badge.red{background:#fee2e2;color:#991b1b}.badge.purple{background:#ede9fe;color:#5b21b6}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}.modal{background:#fff;border-radius:12px;max-width:720px;width:100%;padding:22px;max-height:92vh;overflow:auto}.modal h2{margin-top:0}.field{margin-bottom:12px}.field label{display:block;font-size:12px;color:#4b5563;margin-bottom:4px;font-weight:500}.field input,.field textarea,.field select{width:100%;padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;font-family:inherit}.field textarea{min-height:90px;resize:vertical}.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.detail-grid{display:grid;grid-template-columns:140px 1fr;gap:8px 16px;font-size:14px;margin-bottom:16px}.detail-grid div:nth-child(odd){color:#6b7280}.tabs{display:flex;gap:4px;border-bottom:1px solid #e5e7eb;margin-bottom:14px}.tabs button{background:transparent;border:0;padding:8px 14px;cursor:pointer;color:#6b7280;border-bottom:2px solid transparent;font-size:13px}.tabs button.active{color:#2563eb;border-bottom-color:#2563eb;font-weight:500}.history-row{padding:10px 0;border-bottom:1px solid #f1f3f5;font-size:13px}.history-row:last-child{border-bottom:0}.history-row .when{color:#9ca3af;font-size:11px}.dropzone{border:2px dashed #cbd5e1;border-radius:10px;padding:30px;text-align:center;color:#64748b;cursor:pointer;background:#f8fafc}.dropzone.drag{border-color:#2563eb;background:#eff6ff}.preview{max-width:220px;max-height:140px;border-radius:8px;margin-top:10px}.error{background:#fee2e2;color:#991b1b;padding:10px 12px;border-radius:6px;font-size:13px;margin-bottom:12px}.success{background:#d1fae5;color:#065f46;padding:10px 12px;border-radius:6px;font-size:13px;margin-bottom:12px}.spinner{display:inline-block;width:16px;height:16px;border:2px solid #93c5fd;border-top-color:#2563eb;border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle}@keyframes spin{to{transform:rotate(360deg)}}code{background:#f1f3f5;padding:1px 4px;border-radius:3px;font-size:12px}details summary{outline:none}
