*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;font-family:Arial,sans-serif;background:#f3f6fb;color:#1f2937;font-size:14px}.shell{display:grid;grid-template-columns:260px 1fr;min-height:100vh;width:100vw}aside{background:#00156f;color:#fff;padding:22px 14px;display:flex;flex-direction:column;gap:8px}aside b{font-size:22px}aside small{opacity:.8;margin-bottom:14px;border-bottom:1px solid rgba(255,255,255,.25);padding-bottom:14px}aside a{color:#fff;text-decoration:none;padding:12px;border-radius:10px;background:rgba(255,255,255,.08);font-weight:800}aside a.on,aside a:hover{background:#e30613}aside .out{margin-top:auto;background:rgba(255,255,255,.18)}main{padding:24px;overflow:auto}h1{margin:0 0 20px;font-size:30px}h2{margin:0 0 14px;font-size:22px}section,.cards>div,.sum{background:#fff;border:1px solid #d9e2ef;border-radius:14px;padding:18px;margin-bottom:18px;box-shadow:0 3px 14px rgba(0,21,111,.04)}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.cards span,.sum span{display:block;color:#667085;font-size:12px}.cards b,.sum b{font-size:28px;color:#00156f}.sum{text-decoration:none;color:#1f2937}.sum.active{border-color:#e30613}.sum.active b{color:#e30613}.two{display:grid;grid-template-columns:1.2fr .9fr;gap:18px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}label{display:block;font-weight:800;margin-bottom:12px}input,select,textarea{width:100%;border:1px solid #cfd8e3;border-radius:9px;padding:10px;font-size:14px}.filter{display:flex;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid #d9e2ef;border-radius:14px;padding:14px;margin-bottom:16px}.filter input,.filter select{width:auto;min-width:160px}table{width:100%;border-collapse:collapse}th,td{border-bottom:1px solid #edf1f7;text-align:left;padding:9px;font-size:13px;vertical-align:middle}th{background:#fafcff;font-weight:900}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfd8e3;border-radius:9px;padding:8px 12px;min-height:34px;text-decoration:none;color:#1f2937;background:#fff;font-weight:900;cursor:pointer}.btn.red{background:#e30613;border-color:#e30613;color:#fff}.btn.blue{background:#00156f;border-color:#00156f;color:#fff}.pill{background:#eef3ff;color:#00156f;border-radius:999px;padding:4px 8px;font-weight:900;font-size:12px}.status{display:flex;gap:8px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin:12px 0}.status label{display:inline-flex;gap:6px;align-items:center;margin:0;padding:8px 12px;background:#fff;border:1px solid #cfd8e3;border-radius:999px;color:#00156f}.status input{width:auto}.ok{background:#dcfce7;color:#166534;padding:10px;border-radius:10px}.err{background:#fee2e2;color:#991b1b;padding:10px;border-radius:10px}.log{border-left:4px solid #00156f;background:#fafcff;border-radius:10px;padding:10px;margin:10px 0}.template{border:1px solid #d9e2ef;border-radius:14px;padding:16px;margin:16px 0;background:#fafcff}.preview{border:1px solid #d9e2ef;border-radius:14px;overflow:auto}.login{display:flex;align-items:center;justify-content:center;min-height:100vh}.login .card{width:min(470px,92%);background:#fff;border:1px solid #d9e2ef;border-radius:18px;padding:28px;box-shadow:0 12px 40px rgba(0,21,111,.12)}@media(max-width:900px){.shell,.two,.grid{grid-template-columns:1fr}.filter input,.filter select{width:100%}}
.muted{color:#667085;font-size:13px;line-height:1.55;margin-top:-4px}.inline{display:inline;margin:0}.inline button[disabled]{opacity:.45;cursor:not-allowed}.two section table .btn{min-height:30px;padding:6px 10px}section .grid select{background:#fff}.filter input[type=password]{min-width:220px}

.btn.green{background:#16a34a;border-color:#16a34a;color:#fff}.btn.green:hover{background:#12803b;border-color:#12803b;color:#fff}.btn.disabled{opacity:.45;cursor:not-allowed;background:#f3f4f6;color:#667085}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* v4 lead operations */
.lead-stats{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));margin-bottom:16px}.bulkbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:#fff;border:1px solid #d9e2ef;border-radius:14px;padding:12px;margin-bottom:14px}.bulkbar select{width:auto;min-width:160px}.table-card{padding:0;overflow:hidden}.table-scroll{overflow:auto;width:100%}.leads-table{min-width:1450px}.leads-table th,.leads-table td{white-space:normal}.leads-table td:nth-child(11){min-width:210px}.leads-table td:last-child{min-width:260px}.mini-link{display:inline-block;margin-top:4px;color:#16a34a;font-weight:900;text-decoration:none;font-size:12px}.pill.st-yenilead{background:#eef3ff;color:#00156f}.pill.st-arandi{background:#e0e7ff;color:#1e1b4b}.pill.st-ulasilamadi{background:#f1f5f9;color:#475569}.pill.st-bilgiverildi{background:#ffedd5;color:#9a3412}.pill.st-takipte{background:#f3e8ff;color:#6b21a8}.pill.st-randevu{background:#fef9c3;color:#854d0e}.pill.st-kayit{background:#dcfce7;color:#166534}.pill.st-olumsuz{background:#fee2e2;color:#991b1b}.lead-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #d9e2ef;border-radius:14px;padding:18px;margin-bottom:18px}.lead-head h2{margin-bottom:6px}.mail-summary{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin-bottom:14px}.mail-summary p{margin:6px 0}.actions form{margin:0}.actions .btn{margin:0 2px 4px 0}@media(max-width:900px){.bulkbar select{width:100%}.leads-table{min-width:1100px}.lead-head{display:block}}

/* v4.1 bulk action spacing */
.bulkbar{row-gap:10px!important;padding-top:16px!important;padding-bottom:16px!important}
.bulkbar .btn{margin:6px 0!important}
.bulkbar .muted{margin:6px 0!important}


/* v4.3 compact action menu + table fit */
main{padding:22px;}
.filter{gap:10px;}
.table-scroll{overflow-x:auto;max-width:100%;}
.leads-table{min-width:1180px;table-layout:fixed;}
.leads-table.compact{min-width:980px;}
.leads-table th,.leads-table td{font-size:12.5px;padding:8px;line-height:1.3;word-break:break-word;}
.leads-table th:nth-child(1),.leads-table td:nth-child(1){width:34px;}
.leads-table th:nth-child(2),.leads-table td:nth-child(2){width:92px;}
.leads-table th:nth-child(3),.leads-table td:nth-child(3){width:86px;}
.leads-table th:nth-child(4),.leads-table td:nth-child(4){width:110px;}
.leads-table th:nth-child(5),.leads-table td:nth-child(5){width:96px;}
.leads-table th:nth-child(6),.leads-table td:nth-child(6){width:150px;}
.leads-table th:nth-child(7),.leads-table td:nth-child(7){width:120px;}
.leads-table th:nth-child(8),.leads-table td:nth-child(8){width:115px;}
.leads-table th:nth-child(9),.leads-table td:nth-child(9){width:90px;}
.leads-table th:nth-child(10),.leads-table td:nth-child(10){width:90px;}
.leads-table th:nth-child(11),.leads-table td:nth-child(11){width:140px;min-width:0!important;}
.leads-table th:nth-child(12),.leads-table td:nth-child(12){width:80px;}
.leads-table th:nth-child(13),.leads-table td:nth-child(13){width:86px;min-width:0!important;}
.actions.compact-actions{min-width:0!important;width:86px!important;overflow:visible;}
.action-menu{position:relative;display:inline-block;}
.action-menu summary{list-style:none;cursor:pointer;background:#00156f;color:#fff;border-radius:9px;padding:8px 10px;font-weight:900;font-size:12px;white-space:nowrap;}
.action-menu summary::-webkit-details-marker{display:none;}
.action-menu[open] summary{background:#e30613;}
.action-menu-list{position:absolute;right:0;top:38px;z-index:50;min-width:150px;background:#fff;border:1px solid #d9e2ef;border-radius:12px;box-shadow:0 12px 30px rgba(15,23,42,.18);padding:6px;}
.action-menu-list a,.action-menu-list button{display:block;width:100%;border:0;background:#fff;color:#1f2937;text-align:left;text-decoration:none;padding:9px 10px;border-radius:8px;font-weight:800;font-size:13px;cursor:pointer;font-family:inherit;}
.action-menu-list a:hover,.action-menu-list button:hover{background:#f1f5f9;}
.action-menu-list a[href*="web.whatsapp"]{color:#12803b;}
.action-menu-list button{color:#e30613;}
.mini-link{display:none!important;}
@media(max-width:1200px){aside{width:240px}.shell{grid-template-columns:240px 1fr}main{padding:18px}.leads-table{min-width:1120px}}

/* v4.4 template management */
.template-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap;margin-bottom:10px}
.template-head h2{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.template textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.45}
