/* Kesin Çözüm V1.7 — beyaz premium müşteri CRM görünümü */
:root{
  --crm-navy:#172b3f;
  --crm-navy-2:#263f57;
  --crm-blue:#2878c8;
  --crm-blue-soft:#edf5ff;
  --crm-green:#118354;
  --crm-green-soft:#eaf8f1;
  --crm-purple:#7048b8;
  --crm-purple-soft:#f4efff;
  --crm-canvas:#f5f8fb;
  --crm-border:#dbe5ed;
  --crm-shadow:0 16px 42px rgba(24,48,72,.09);
}

.customer-page,.customer-detail-page{color:var(--crm-navy)}
.customer-page::before,.customer-detail-page::before{content:'';position:fixed;inset:104px 0 0 var(--sidebar);z-index:-1;background:radial-gradient(circle at 92% 5%,rgba(40,120,200,.055),transparent 29%),linear-gradient(180deg,#fbfdff 0%,var(--crm-canvas) 100%)}
.customer-filter-toolbar{border-color:var(--crm-border);box-shadow:0 10px 30px rgba(24,48,72,.055)}
.customer-filter-toolbar input,.customer-filter-toolbar select{border-color:#d7e2ea;background:#fff;color:var(--crm-navy)}

/* Beyaz müşteri portföyü */
.premium-customer-directory.customer-directory{overflow:hidden;border:1px solid var(--crm-border);background:#fff;box-shadow:var(--crm-shadow);border-radius:20px}
.premium-customer-directory .customer-directory-head{position:relative;min-height:76px;padding:18px 22px;color:var(--crm-navy);background:#fff;border-bottom:1px solid var(--crm-border)}
.premium-customer-directory .customer-directory-head::before{content:'';position:absolute;left:0;right:0;bottom:0;height:4px;background:linear-gradient(90deg,var(--crm-green) 0 31%,#45a2dc 31% 66%,#d8e6ef 66%)}
.premium-customer-directory .customer-directory-head::after{display:none}
.premium-customer-directory .customer-directory-head>div:first-child>span{font-size:15px;letter-spacing:.075em;color:var(--crm-navy)}
.premium-customer-directory .customer-directory-head small{color:#718293;font-size:10px}
.premium-customer-directory .customer-directory-legend span{color:#617487}
.premium-customer-directory .customer-directory-legend .legend-active i{background:#2fbd76;box-shadow:0 0 0 3px rgba(47,189,118,.13)}
.premium-customer-directory .customer-directory-legend .legend-prospect i{background:#9365d5;box-shadow:0 0 0 3px rgba(147,101,213,.13)}
.premium-customer-directory .customer-directory-legend .legend-passive i{background:#8796a4;box-shadow:0 0 0 3px rgba(135,150,164,.14)}
.premium-customer-directory .customer-directory-legend b{border-color:#d5e1e9;background:#f5f8fb;color:var(--crm-navy)}
.premium-customer-directory .customer-strip-list{gap:10px;padding:14px;background:#f7fafc}
.premium-customer-directory .customer-strip,
.premium-customer-directory .customer-strip:nth-child(even){grid-template-columns:minmax(250px,1.15fr) minmax(140px,.55fr) minmax(420px,1.65fr) auto;gap:14px;min-height:112px;padding:15px 16px;border:1px solid var(--crm-border);border-left:5px solid #42a67b;border-radius:15px;color:var(--crm-navy);background:#fff;box-shadow:0 5px 18px rgba(24,48,72,.055);filter:none}
.premium-customer-directory .customer-strip.prospect{border-left-color:#8a5bc8;background:linear-gradient(90deg,#fff 0%,#fff 78%,#fbf8ff 100%)}
.premium-customer-directory .customer-strip.passive{border-left-color:#8997a4;background:linear-gradient(90deg,#fff 0%,#fff 78%,#f5f7f9 100%)}
.premium-customer-directory .customer-strip.contract-expired,.premium-customer-directory .customer-strip.contract-urgent{border-left-color:#cf3d37}
.premium-customer-directory .customer-strip.contract-warning,.premium-customer-directory .customer-strip.contract-notice{border-left-color:#e28a25}
.premium-customer-directory .customer-strip::after{display:none}
.premium-customer-directory .customer-strip:hover{z-index:1;transform:translateY(-3px);filter:none;border-color:#c0d3df;box-shadow:0 16px 31px rgba(24,48,72,.12)}
.premium-customer-directory .customer-strip-main{color:var(--crm-navy)}
.premium-customer-directory .customer-strip-main:focus-visible,.premium-customer-directory .customer-strip-action:focus-visible,.premium-customer-directory .customer-phone-badge:focus-visible,.premium-customer-directory .customer-whatsapp-badge:focus-visible{outline:3px solid rgba(40,120,200,.24);outline-offset:3px}
.premium-customer-directory .customer-strip-avatar{width:50px;height:50px;border:1px solid #c7dde5;border-radius:14px;background:linear-gradient(145deg,#edf8f4,#e3f1f7);box-shadow:inset 0 1px 0 #fff;color:#156647;font-size:14px}
.premium-customer-directory .customer-strip-name{gap:6px}
.premium-customer-directory .customer-strip-name strong{color:var(--crm-navy);font-size:14px;text-shadow:none}
.premium-customer-directory .customer-strip-name small{color:#718293;font-size:9px}
.customer-status-line{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.customer-status-badge,.customer-contract-badge{display:inline-flex;align-items:center;width:max-content;border-radius:999px;padding:5px 8px;font-size:8px;font-style:normal;font-weight:900;letter-spacing:.035em;line-height:1;text-transform:uppercase}
.customer-status-badge.active{background:var(--crm-green-soft);color:var(--crm-green)}
.customer-status-badge.prospect{background:var(--crm-purple-soft);color:var(--crm-purple)}
.customer-status-badge.passive{background:#edf1f4;color:#586a79}
.customer-contract-badge{background:#f1f4f7;color:#697a89}
.customer-contract-badge.valid{background:#e9f7ef;color:#177247}.customer-contract-badge.notice{background:#eef5ff;color:#1f69ad}.customer-contract-badge.warning{background:#fff4e5;color:#a95806}.customer-contract-badge.urgent,.customer-contract-badge.expired{background:#fff0ef;color:#b82e28}
.premium-customer-directory .customer-strip-contact{display:grid;gap:7px}
.premium-customer-directory .customer-phone-badge,.premium-customer-directory .customer-whatsapp-badge{min-height:34px;padding:8px 11px;border-radius:9px;font-size:9px}
.premium-customer-directory .customer-phone-badge{border-color:#a8ddbf;background:linear-gradient(135deg,#2dbd70,#179151);box-shadow:0 7px 15px rgba(20,139,78,.15);color:#fff}
.premium-customer-directory .customer-phone-badge.disabled{border-color:#d6e0e7;background:#eef3f6;color:#718293;box-shadow:none}
.premium-customer-directory .customer-whatsapp-badge{border-color:#bde4cd;background:#eefaf3;color:#117343}
.premium-customer-directory .customer-strip-meta{grid-template-columns:minmax(92px,.8fr) minmax(120px,1.1fr) minmax(115px,1fr) 50px;gap:7px}
.premium-customer-directory .customer-strip-meta>span{gap:5px;padding:10px;border:1px solid #e0e8ee;border-radius:10px;background:#f8fafc}
.premium-customer-directory .customer-strip-meta small{color:#718293;font-size:7px}
.premium-customer-directory .customer-strip-meta b{color:var(--crm-navy);font-size:9px}
.premium-customer-directory .customer-strip-meta .customer-area-meta{background:var(--crm-blue-soft);border-color:#d6e7fa}.premium-customer-directory .customer-area-meta b{color:#1e67a9}
.premium-customer-directory .customer-strip-meta .customer-last-service{background:#f2f9f7;border-color:#d9ebe5}.premium-customer-directory .customer-last-service b{color:#167557}
.premium-customer-directory .customer-strip-meta .customer-job-count{background:#eff8f4;border-color:#d7ebe2}.premium-customer-directory .customer-job-count b{color:#0b7750}
.premium-customer-directory .customer-strip-actions{display:grid;grid-template-columns:repeat(2,minmax(56px,1fr));gap:6px}
.premium-customer-directory .customer-strip-action{min-height:35px;padding:8px 9px;border:1px solid #d7e2ea;border-radius:9px;background:#fff;color:#304a60;font-size:8px}
.premium-customer-directory .customer-strip-action:hover{background:#f6f9fb;border-color:#9eb9ca}.premium-customer-directory .customer-strip-action.note{color:#7350a6;background:#f8f4ff;border-color:#e1d5f3}.premium-customer-directory .customer-strip-action.open{color:#0c7650;background:#f0f9f5;border-color:#cde9dc}.premium-customer-directory .customer-strip-action.danger{color:#bc302b;background:#fff4f3;border-color:#f3d1ce}

/* Beyaz premium müşteri kartı */
.customer-detail-page .customer-hero-card{overflow:hidden;color:var(--crm-navy);border:1px solid var(--crm-border);background:radial-gradient(circle at 91% -15%,rgba(18,131,84,.09),transparent 32%),linear-gradient(135deg,#fff 0%,#fbfdff 100%);box-shadow:var(--crm-shadow)}
.customer-detail-page .customer-hero-card::before{content:'';position:absolute;inset:0 auto 0 0;width:7px;background:linear-gradient(180deg,var(--crm-green),#45a2dc)}
.customer-detail-page .customer-hero-card::after{border-color:rgba(40,120,200,.045)}
.customer-detail-page .customer-avatar{border-color:#c5ddd3;background:linear-gradient(145deg,#edf8f3,#dcefe7);color:#0d7048;box-shadow:none}
.customer-detail-page .customer-hero-main h2{color:var(--crm-navy)}
.customer-detail-page .customer-hero-main p{color:#6d7d8c}
.customer-detail-page .customer-contact-grid{grid-template-columns:minmax(150px,.7fr) minmax(260px,1.4fr) minmax(170px,.8fr) minmax(150px,.65fr)}
.customer-detail-page .customer-contact-grid>div,.customer-detail-page .customer-contact-grid>div:last-child{grid-column:auto;border-color:#dce7ee;background:#f7fafc}
.customer-detail-page .customer-contact-grid small{color:#718293}.customer-detail-page .customer-contact-grid strong{color:var(--crm-navy)}
.customer-detail-page .last-service-hero{background:#eef8f4!important;border-color:#d4eade!important}.customer-detail-page .last-service-hero strong{color:#0c7750}
.customer-detail-page .customer-quick-actions .secondary-btn{border-color:#d4e1e9;color:#24445a;background:#fff}
.customer-detail-page .owner-action-strip{border-top-color:#dce6ed}.customer-detail-page .owner-action-label{color:#64788a}

.customer-crm-summary{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:16px}
.customer-status-callout,.customer-contract-card{position:relative;overflow:hidden;border:1px solid var(--crm-border);border-radius:17px;background:#fff;padding:19px 20px;box-shadow:0 8px 24px rgba(24,48,72,.055)}
.customer-status-callout{display:flex;align-items:center;justify-content:space-between;gap:18px}
.customer-status-callout::before,.customer-contract-card::before{content:'';position:absolute;inset:0 auto 0 0;width:5px;background:var(--crm-green)}
.customer-status-callout.prospect::before{background:var(--crm-purple)}
.customer-status-callout.passive::before{background:#8997a4}
.customer-status-callout small,.customer-contract-card small{color:#718293;font-size:8px;font-weight:900;letter-spacing:.09em}.customer-status-callout strong{display:block;margin-top:5px;color:var(--crm-navy);font-size:16px}.customer-status-callout p,.customer-contract-card>p{margin:5px 0 0;color:#718293;font-size:10px;line-height:1.5}.status-check{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--crm-green-soft);color:var(--crm-green);font-weight:900}
.customer-contract-card::before{background:#2c7ec4}.customer-contract-card.warning::before,.customer-contract-card.notice::before{background:#dd8629}.customer-contract-card.urgent::before,.customer-contract-card.expired::before{background:#c83d36}.customer-contract-card.none::before{background:#9aa9b5}
.customer-contract-card header{display:flex;align-items:center;justify-content:space-between;gap:12px}.customer-contract-card header strong{display:block;margin-top:5px;font-size:15px}.customer-contract-card header>span{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--crm-blue-soft);color:var(--crm-blue)}
.customer-contract-card dl{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:15px 0 0}.customer-contract-card dl>div{padding:10px;border:1px solid #e2e9ee;border-radius:10px;background:#f8fafc}.customer-contract-card dt{color:#728292;font-size:7px;font-weight:900;text-transform:uppercase}.customer-contract-card dd{margin:5px 0 0;color:var(--crm-navy);font-size:10px;font-weight:850}
.highlight-row{margin:2px -10px;padding:12px 10px!important;border:1px solid #d9ece3!important;border-radius:10px;background:#f1faf6}.highlight-row strong{color:#0e7650}

/* Görüşme geçmişi */
.customer-interaction-panel{overflow:hidden}.customer-interaction-timeline{position:relative;display:grid;gap:10px;margin-top:17px;padding-left:17px}.customer-interaction-timeline::before{content:'';position:absolute;left:5px;top:9px;bottom:9px;width:2px;background:#dbe5ec}
.customer-interaction-item{position:relative;display:grid;grid-template-columns:1fr auto;gap:12px;padding:13px 14px;border:1px solid #dfe8ee;border-radius:13px;background:#fbfdff}
.interaction-dot{position:absolute;left:-17px;top:17px;width:11px;height:11px;border:3px solid #fff;border-radius:50%;background:#2c82c8;box-shadow:0 0 0 2px #b9d8ef}.customer-interaction-item.whatsapp .interaction-dot{background:#21a561;box-shadow:0 0 0 2px #bfe7d0}.customer-interaction-item.meeting .interaction-dot{background:#7651c7;box-shadow:0 0 0 2px #d9cff1}.customer-interaction-item.phone .interaction-dot{background:#e08a2c;box-shadow:0 0 0 2px #f2d6b7}
.interaction-copy>div{display:flex;justify-content:space-between;gap:12px}.interaction-copy strong{font-size:11px}.interaction-copy time{color:#728292;font-size:9px;font-weight:700}.interaction-copy p{margin:7px 0;color:#334b5f;font-size:11px;line-height:1.55;white-space:pre-wrap}.interaction-copy small{color:#718293;font-size:9px}.interaction-delete{align-self:start}
.interaction-modal-customer{display:flex;align-items:center;gap:11px;margin-bottom:17px;padding:12px;border:1px solid #dce7ee;border-radius:13px;background:#f6f9fb}.interaction-modal-customer>span{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--crm-green-soft);color:var(--crm-green);font-weight:900}.interaction-modal-customer small,.interaction-modal-customer strong{display:block}.interaction-modal-customer small{color:#718293;font-size:8px;font-weight:900;letter-spacing:.08em}.interaction-modal-customer strong{margin-top:4px;font-size:13px}

/* Müşteri formu ve konum alternatifi */
.customer-crm-form-section{border-color:#dbe6ed;background:linear-gradient(145deg,#fbfdff,#f4f8fb)}
.customer-crm-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.contract-form-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:15px;border:1px solid #d9e5ec;border-radius:14px;background:#fff}.contract-form-fields.hidden{display:none}
.input-suffix{display:flex;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.input-suffix:focus-within{border-color:var(--green);box-shadow:0 0 0 3px rgba(11,107,58,.1)}.input-suffix input{border:0!important;border-radius:0!important;box-shadow:none!important}.input-suffix>span{display:grid;place-items:center;min-width:45px;padding:0 12px;border-left:1px solid var(--line);background:#f5f8fa;color:#526879;font-size:11px;font-weight:900}
.contract-end-preview{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;border:1px solid #cfe5da;border-radius:12px;background:#f0f9f5}.contract-end-preview small{color:#557466;font-size:8px;font-weight:900;letter-spacing:.08em}.contract-end-preview strong{color:#0c744d;font-size:13px}
.map-form-section{border-color:#d9e5ec;background:linear-gradient(145deg,#fbfdff,#f4f8fb)}
.map-form-section .customer-map{border-color:#b8cbd8;background:#e9f0f5;box-shadow:inset 0 0 0 1px #fff,0 8px 20px rgba(24,48,72,.055)}
.location-choice-divider{position:relative;display:grid;place-items:center;height:24px}.location-choice-divider::before{content:'';position:absolute;left:0;right:0;height:1px;background:#d9e4eb}.location-choice-divider span{position:relative;padding:4px 11px;border:1px solid #d8e3ea;border-radius:999px;background:#fff;color:#6d7f8f;font-size:8px;font-weight:900;letter-spacing:.1em}
.google-map-url-field{padding:13px;border:1px solid #dbe6ed;border-radius:13px;background:#fff}.google-map-url-field>span::before{content:'⌖';margin-right:7px;color:var(--crm-blue)}

/* Ana ekran sözleşme uyarıları */
.contract-alert-panel{overflow:hidden}.contract-alert-grid{display:grid;gap:9px;padding:16px 20px 20px}.contract-alert-card{display:grid;grid-template-columns:40px 1fr auto;gap:12px;align-items:center;border:1px solid #eadbc8;border-left:5px solid #de8a2f;border-radius:13px;padding:12px;background:#fffaf4}.contract-alert-card.expired,.contract-alert-card.urgent{border-color:#efd0ce;border-left-color:#c83d36;background:#fff7f6}.contract-alert-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#fff0d9}.contract-alert-card strong{display:block;font-size:12px}.contract-alert-card p{margin:4px 0 0;color:#718293;font-size:9px}

@media(max-width:1380px){
  .premium-customer-directory .customer-strip,.premium-customer-directory .customer-strip:nth-child(even){grid-template-columns:minmax(230px,1.1fr) minmax(130px,.55fr) minmax(360px,1.55fr)}
  .premium-customer-directory .customer-strip-actions{grid-column:1/-1;display:flex;justify-content:flex-end}
}
@media(max-width:1060px){
  .premium-customer-directory .customer-strip,.premium-customer-directory .customer-strip:nth-child(even){grid-template-columns:minmax(220px,1.1fr) minmax(130px,.7fr)}
  .premium-customer-directory .customer-strip-meta,.premium-customer-directory .customer-strip-actions{grid-column:1/-1}
  .customer-detail-page .customer-contact-grid{grid-template-columns:1fr 1fr}.customer-crm-summary{grid-template-columns:1fr}.customer-contract-card dl{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:860px){.customer-page::before,.customer-detail-page::before{left:0}.customer-detail-page .customer-contact-grid{grid-template-columns:1fr}.customer-crm-form-grid{grid-template-columns:1fr}.contract-form-fields{grid-template-columns:1fr}.customer-status-callout{align-items:flex-start}.contract-alert-card{grid-template-columns:40px 1fr}.contract-alert-card .mini-btn{grid-column:2;justify-self:start}}
@media(max-width:680px){
  .premium-customer-directory .customer-directory-head{align-items:flex-start;padding:15px}.premium-customer-directory .customer-directory-legend span{display:none}
  .premium-customer-directory .customer-strip-list{padding:9px}.premium-customer-directory .customer-strip,.premium-customer-directory .customer-strip:nth-child(even){grid-template-columns:1fr;padding:14px;gap:12px}
  .premium-customer-directory .customer-strip-contact,.premium-customer-directory .customer-strip-meta,.premium-customer-directory .customer-strip-actions{grid-column:1}.premium-customer-directory .customer-strip-contact{display:flex}.premium-customer-directory .customer-strip-meta{grid-template-columns:1fr 1fr}.premium-customer-directory .customer-strip-meta .customer-job-count{grid-column:auto}.premium-customer-directory .customer-strip-actions{display:grid;grid-template-columns:1fr 1fr;justify-content:stretch}
  .customer-status-callout{display:grid}.customer-contract-card dl{grid-template-columns:1fr 1fr}.interaction-copy>div{display:grid;gap:4px}.contract-end-preview{display:grid}
}

/* V1.7.2 · güvenli kalıcı müşteri silme */
.customer-delete-form{display:grid;gap:18px}.customer-delete-warning{display:grid;grid-template-columns:54px 1fr;gap:15px;align-items:center;padding:18px;border:1px solid #f2c7c3;border-radius:16px;background:linear-gradient(135deg,#fff8f7,#fff1ef)}.customer-delete-warning>span{width:54px;height:54px;border-radius:15px;display:grid;place-items:center;background:#c9362f;color:#fff;font-size:27px;font-weight:900;box-shadow:0 10px 22px rgba(201,54,47,.2)}.customer-delete-warning small{display:block;color:#b62f29;font-size:10px;font-weight:900;letter-spacing:.12em}.customer-delete-warning h3{margin:4px 0 5px;font-size:22px;color:#2d1715}.customer-delete-warning p{margin:0;color:#7b4b47;font-size:13px;line-height:1.55}.customer-delete-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.customer-delete-counts>div{padding:14px;border:1px solid #e1e7e4;border-radius:13px;background:#fff;text-align:center}.customer-delete-counts strong{display:block;color:#b92f29;font-size:22px}.customer-delete-counts span{display:block;margin-top:4px;color:#64736b;font-size:11px;font-weight:750}.customer-delete-note strong{display:block;margin-bottom:3px}.customer-delete-confirm{padding:16px;border:1px solid #efc3bf;border-radius:14px;background:#fffafa}.customer-delete-confirm b{color:#b92f29}.customer-delete-confirm input{text-transform:uppercase;border-color:#e4a9a4}.customer-delete-confirm input:focus{border-color:#c9362f;box-shadow:0 0 0 3px rgba(201,54,47,.1)}
@media(max-width:680px){.customer-delete-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-delete-warning{grid-template-columns:44px 1fr}.customer-delete-warning>span{width:44px;height:44px;border-radius:12px}}
@media(max-width:480px){.premium-customer-directory .customer-strip-meta{grid-template-columns:1fr}.customer-contract-card dl{grid-template-columns:1fr}.customer-interaction-item{grid-template-columns:1fr}.interaction-delete{justify-self:start}}
@media(prefers-reduced-motion:reduce){.premium-customer-directory .customer-strip{transition:none!important}}
