.app-shell{display:flex;min-height:100vh}.app-sidebar{width:220px;background:#0f172a;color:#fff;padding:20px 16px;flex-shrink:0}.app-brand{font-weight:700;margin-bottom:24px;font-size:1rem}.app-sidebar nav{display:flex;flex-direction:column;gap:4px}.app-sidebar a{color:#cbd5e1;text-decoration:none;padding:8px 10px;border-radius:6px;font-size:.9rem}.app-sidebar a.active,.app-sidebar a:hover{background:#1e293b;color:#fff}.app-main{flex:1;display:flex;flex-direction:column;min-width:0}.app-header{display:flex;justify-content:flex-end;align-items:center;gap:16px;padding:14px 24px;background:#fff;border-bottom:1px solid #e2e8f0}.header-link{font-size:.85rem;color:#2563eb;text-decoration:none}.header-link:hover{text-decoration:underline}.logout-btn{border:1px solid #cbd5e1;background:#fff;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:.85rem}.app-content{padding:24px;flex:1}@media(max-width:768px){.app-shell{flex-direction:column}.app-sidebar{width:100%;display:flex;align-items:center;justify-content:space-between;padding:12px 16px}.app-sidebar nav{flex-direction:row}}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0f172a;padding:16px}.login-card{width:100%;max-width:380px;background:#fff;border-radius:12px;padding:32px;box-shadow:0 10px 30px #0003}.login-title{font-size:1.25rem;margin:0 0 4px;color:#0f172a}.login-subtitle{margin:0 0 24px;color:#64748b;font-size:.9rem}.login-card form{display:flex;flex-direction:column}.login-card label{font-size:.85rem;font-weight:600;color:#334155;margin-top:12px;margin-bottom:4px}.login-card input{padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;font-size:.95rem}.login-card input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb26}.form-error{margin-top:16px;padding:10px 12px;background:#fef2f2;color:#b91c1c;border-radius:8px;font-size:.85rem}.login-card button{margin-top:24px;padding:11px;border:none;border-radius:8px;background:#2563eb;color:#fff;font-weight:600;cursor:pointer}.login-card button:disabled{opacity:.6;cursor:not-allowed}.password-hint{font-size:.78rem;color:#64748b;margin:10px 0 0}.link-button{display:block;margin:14px auto 0;background:none;border:none;color:#64748b;font-size:.82rem;text-decoration:underline;cursor:pointer}@media(max-width:480px){.login-card{padding:24px}}.modal-overlay{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;padding:16px;z-index:100}.modal-card{background:#fff;border-radius:12px;width:100%;max-width:480px;max-height:90vh;overflow-y:auto;box-shadow:0 20px 50px #00000040}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #e2e8f0}.modal-header h2{font-size:1.05rem;margin:0}.modal-close{border:none;background:none;font-size:1.4rem;line-height:1;cursor:pointer;color:#64748b}.modal-body{padding:20px}.monthly-fee-banner{display:flex;align-items:center;justify-content:space-between;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px 16px;margin-bottom:16px}.monthly-fee-label{font-size:.82rem;color:#64748b}.monthly-fee-amount{font-size:1.25rem;font-weight:700;color:#0f172a}.payment-type-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}.payment-type-choice{display:flex;align-items:flex-start;gap:10px;text-align:left;padding:12px;border-radius:10px;border:1.5px solid #e2e8f0;background:#fff;cursor:pointer}.payment-type-choice:hover{border-color:#94a3b8}.payment-type-choice.selected{border-color:#2563eb;background:#eff6ff}.payment-type-choice strong{display:block;font-size:.88rem;margin-bottom:2px}.payment-type-icon{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:#e2e8f0;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700;color:#475569}.payment-type-choice.selected .payment-type-icon{background:#2563eb;color:#fff}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.page-header h1{margin:0}.btn{border:none;border-radius:8px;padding:9px 16px;font-size:.88rem;font-weight:600;cursor:pointer}.btn-primary{background:#2563eb;color:#fff}.btn-secondary{background:#fff;border:1px solid #cbd5e1;color:#334155}.btn-danger{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.btn:disabled{opacity:.5;cursor:not-allowed}.data-table-wrap{background:#fff;border-radius:12px;border:1px solid #e2e8f0;overflow:auto}table.data-table{width:100%;border-collapse:collapse;font-size:.88rem}table.data-table th{text-align:left;padding:10px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#475569;font-weight:600;white-space:nowrap}table.data-table td{padding:10px 14px;border-bottom:1px solid #f1f5f9;vertical-align:middle}table.data-table tr:last-child td{border-bottom:none}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.row-actions select,.row-actions button{font-size:.78rem;padding:5px 8px;border-radius:6px;border:1px solid #cbd5e1;background:#fff;cursor:pointer}.badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:.75rem;font-weight:600}.badge-active{background:#dcfce7;color:#166534}.badge-disabled{background:#fee2e2;color:#991b1b}.form-field{display:flex;flex-direction:column;margin-bottom:14px}.form-field label{font-size:.85rem;font-weight:600;color:#334155;margin-bottom:4px}.form-field input,.form-field select,.form-field textarea{padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;font-size:.9rem}.field-error{color:#dc2626;font-size:.78rem;margin-top:4px}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.banner{padding:12px 14px;border-radius:8px;font-size:.85rem;margin-bottom:16px}.banner-info{background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe}.banner-error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.banner-success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}.btn-link{background:none;border:none;color:#2563eb;font-size:.82rem;font-weight:600;cursor:pointer;padding:2px 0;margin-left:8px;text-decoration:underline}.banner code{background:#00000014;padding:1px 6px;border-radius:4px}.empty-state{padding:40px 20px;text-align:center;color:#64748b}.filter-bar{display:flex;gap:10px;margin-bottom:16px}.filter-bar input{flex:1;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;font-size:.85rem}.filter-bar select{padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;font-size:.85rem}.badge.status-new{background:#e0f2fe;color:#075985}.badge.status-contacted{background:#fef3c7;color:#92400e}.badge.status-qualified,.badge.status-interested{background:#dcfce7;color:#166534}.badge.status-documents_pending{background:#fef3c7;color:#92400e}.badge.status-converted{background:#dbeafe;color:#1e40af}.badge.status-not_interested{background:#f1f5f9;color:#475569}.badge.status-lost{background:#fee2e2;color:#991b1b}.badge.status-follow_up{background:#ede9fe;color:#5b21b6}.badge.status-active{background:#dcfce7;color:#166534}.badge.status-overdue{background:#fee2e2;color:#991b1b}.badge.status-negotiation{background:#fef3c7;color:#92400e}.badge.status-settled{background:#dbeafe;color:#1e40af}.badge.status-closed,.badge.status-written_off{background:#f1f5f9;color:#475569}.badge.status-unpaid{background:#fee2e2;color:#991b1b}.badge.status-partially_paid{background:#fef3c7;color:#92400e}.badge.status-paid{background:#dcfce7;color:#166534}.badge.status-void{background:#f1f5f9;color:#475569}.badge.status-failed{background:#fee2e2;color:#991b1b}.badge.status-refunded{background:#ede9fe;color:#5b21b6}.lead-detail-grid{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}.lead-detail-meta{font-size:.82rem;color:#64748b;margin-top:2px}.note-add{display:flex;gap:8px;margin-bottom:16px}.note-add textarea{flex:1;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font-size:.85rem;resize:vertical}.activity-list{list-style:none;padding:0;margin:0;max-height:220px;overflow-y:auto;font-size:.82rem}.activity-list li{padding:8px 0;border-bottom:1px solid #f1f5f9}.activity-time{color:#94a3b8;margin-right:8px}.activity-type{font-weight:600;text-transform:capitalize}.activity-user{color:#64748b}.badge.priority-low{background:#f1f5f9;color:#475569}.badge.priority-medium{background:#e0f2fe;color:#075985}.badge.priority-high{background:#fef3c7;color:#92400e}.badge.priority-urgent{background:#fee2e2;color:#991b1b}.badge.status-pending{background:#e0f2fe;color:#075985}.badge.status-in_progress{background:#fef3c7;color:#92400e}.badge.status-completed{background:#dcfce7;color:#166534}.badge.status-cancelled,.badge.status-on_hold{background:#f1f5f9;color:#475569}.badge.status-waiting_for_client{background:#ede9fe;color:#5b21b6}.badge.status-reopened{background:#fee2e2;color:#991b1b}.row-overdue{background:#fef2f2}.overdue-tag{color:#b91c1c;font-weight:600;font-size:.72rem;margin-left:6px}.action-center-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin-top:16px}.action-center-column{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px}.action-center-column h2{margin:0 0 4px;font-size:1rem}.action-center-column.urgent h2{color:#b91c1c}.action-center-count{font-size:1.6rem;font-weight:700;margin-bottom:10px}.action-center-task{padding:10px 0;border-bottom:1px solid #f1f5f9;display:flex;flex-direction:column;gap:2px}.action-center-task:last-child{border-bottom:none}.action-center-task-title{font-weight:600;font-size:.88rem}.action-center-task-meta{font-size:.78rem;color:#64748b}.action-center-task-actions{margin-top:4px}.action-center-task-actions button{font-size:.75rem;padding:3px 8px;border-radius:6px;border:1px solid #cbd5e1;background:#fff;cursor:pointer}.billing-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #f1f5f9}.billing-card:last-child{border-bottom:none}.billing-card-main{display:flex;flex-direction:column;gap:2px;min-width:0}.billing-card-name{font-weight:600;font-size:.88rem}.billing-card-amount{flex-shrink:0;font-weight:700;font-size:.95rem;color:#0f172a}.billing-card-amount-clickable{background:#eff6ff;border:1.5px solid #bfdbfe;border-radius:8px;padding:6px 12px;cursor:pointer;color:#1d4ed8}.billing-card-amount-clickable:hover{background:#dbeafe;border-color:#93c5fd}.billing-card-amount-partial{color:#b45309}.billing-card-amount-clickable.billing-card-amount-partial{background:#fffbeb;border-color:#fde68a;color:#b45309}.billing-card-amount-clickable.billing-card-amount-partial:hover{background:#fef3c7;border-color:#fcd34d}.roles-layout{display:grid;grid-template-columns:320px 1fr;gap:20px;align-items:start}.role-detail{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:20px}.role-detail h2{margin:0 0 4px}.role-description{color:#64748b;font-size:.85rem;margin:0 0 16px}.row-selected{background:#eff6ff}.permission-groups{display:flex;flex-direction:column;gap:16px;max-height:50vh;overflow-y:auto}.permission-group h3{margin:0 0 8px;font-size:.85rem;text-transform:uppercase;letter-spacing:.03em;color:#475569}.permission-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px 12px}.permission-item{display:flex;align-items:center;gap:6px;font-size:.82rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#1e293b}.permission-item-disabled{color:#94a3b8}.permission-readonly-list{columns:2;font-size:.82rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#1e293b}@media(max-width:900px){.roles-layout{grid-template-columns:1fr}}.client-detail-grid{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}@media(max-width:900px){.client-detail-grid{grid-template-columns:1fr}}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#0f172a;background:#f8fafc}.page-loading{display:flex;align-items:center;justify-content:center;min-height:100vh;color:#64748b}
