/* ==========================================================================
   NUIL BEAUTY PRO - MERKEZİ STİL DOSYASI (V11.9.2 - ZIRHLI MİMARİ)
   ========================================================================== */

/* --- 1. KÖK DEĞİŞKENLER VE TEMEL YAPI --- */
:root {
    --nuil-primary: #D2AD5B;
    --nuil-secondary: #9e7c32;
    --nuil-dark: #1f2937;
    --nuil-light: #faebca;
    --nuil-border: #f3e2bc;
    --nuil-white: #ffffff;
    --nuil-danger: #ef4444;
    --nuil-success: #10b981;
    --nb-sidebar-bg: #414141;
    --nb-card-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

body { font-family: 'Manrope', 'Segoe UI', sans-serif; background: #fffbf0; margin: 0; }

.nuil-main-container { display: flex; width: 100%; min-height: 100vh; position: relative; }

.nb-content { 
    flex: 1; padding: 30px; overflow-y: auto; max-width: 100%; box-sizing: border-box; 
}

.nb-view-header { margin-bottom: 25px; display: flex; justify-content: space-between; align-items: center; }
.nb-logo { font-size: 28px; font-weight: 800; color: var(--nuil-dark); margin: 0; line-height: 1.2; }
.nb-subtitle { font-size: 14px; color: #6b7280; margin-top: 5px; }

/* Başlıkları (H1-H6) Tema Etkisinden Kurtar */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important; color: #616161 !important; line-height: 1.2 !important;
    margin-top: 0 !important; margin-bottom: 0.75rem !important;
    text-transform: none !important; letter-spacing: -0.02em !important; border: none !important;
}
h1::after, h2::after, h3::after, h4::after, h1::before, h2::before, h3::before, h4::before { display: none !important; }

/* --- 2. TEMA EZİCİLERİ VE HARİCİ BUTONLAR --- */
.eltdf-shopping-cart-holder { display: none; }
.eltdf-logo-wrapper a img { height: 65%; padding: 8% 0% 0% 0%; }
.eltdf-main-menu>ul>li>a>span.item_outer { color: #D2AD5B !important; font-size: 14px; text-shadow: 0px 0px #000; }

.nb-header-login-btn {
    margin-right: 25px; background: #D2AD5B; padding: 5px 20px; border: 3px solid var(--nuil-border);
    color: #fff !important; font-family: 'Cormorant Garamond', serif; font-size: 17px; letter-spacing: 0.10em;
    font-weight: 900; display: inline-block; position: relative; transition: 0.3s;
    text-decoration: none !important; border-radius: 6px;
}
.nb-header-login-btn:hover { color: #000 !important; letter-spacing: 0.20em; }

.manual-whatsapp-btn {
    position: fixed; bottom: 60px; right: 20px; background-color: #25d366; color: #fff !important;
    padding: 12px 20px; border-radius: 50px; z-index: 9999999; font-weight: bold; text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); display: flex; align-items: center;
}
.manual-whatsapp-btn:before { content: ' WhatsApp '; margin-right: 5px; }

/* Login (Giriş Sayfası) Logosu */
.login-logo { width: 100%; text-align: center; margin-bottom: 30px; }
.login-logo img { max-width: 250px; width: auto; height: auto; object-fit: contain; }

/* Portal Aktifken Temayı Gizle (Masaüstü ve Mobil Ortak) */
.nb-portal-active #wpadminbar,
.nb-portal-active header.eltdf-mobile-header,
.nb-portal-active .eltdf-mobile-header-inner,
.nb-portal-active .nb-m-center-portal, 
.nb-portal-active .nb-header-login-btn,
.nb-portal-active .eltdf-page-header {
    display: none !important;
}
.nb-portal-active html, .nb-portal-active body { margin-top: 0 !important; padding-top: 0 !important; }

/* --- 3. KARTLAR VE DASHBOARD --- */
.nb-card {
    background: var(--nuil-white); border-radius: 20px; border: 1px solid var(--nuil-border);
    box-shadow: var(--nb-card-shadow); padding: 20px; margin-bottom: 20px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; box-sizing: border-box; width: 100%;
}
.nb-card.compact { padding: 12px 15px; }
.nb-card.gold { border-bottom: 4px solid var(--nuil-primary); }
.nb-card.red { border-bottom: 4px solid var(--nuil-danger); }
.nb-card.green { border-bottom: 4px solid var(--nuil-success); }

.nb-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-label { font-size: 11px; font-weight: 700; color: #9ca3af; letter-spacing: 1px; margin-bottom: 5px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--nuil-dark); }
.stat-value.primary { color: var(--nuil-primary); }
.stat-value.danger { color: var(--nuil-danger); }
.stat-value.success { color: var(--nuil-success); }

.nb-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; width: 100%; }
.action-card { display: flex; align-items: center; gap: 15px; padding: 25px; cursor: pointer; border-radius: 20px; background: #fff; border: 1px solid var(--nuil-border); transition: 0.2s; }
.action-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.action-icon { font-size: 28px; }

/* --- 4. SİDEBAR VE NAVİGASYON --- */
.nb-sidebar { 
    width: 260px; background: var(--nb-sidebar-bg); display: flex; flex-direction: column; 
    padding: 30px 0; position: sticky; top: 0; z-index: 100; transition: left 0.3s ease;
}
.nb-sidebar-logo { display: flex; justify-content: center; align-items: center; padding: 20px 15px; height: 120px; border-bottom: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.nb-sidebar-logo img { max-width: 100%; max-height: 80px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

.nb-nav { flex: 1; display: flex; flex-direction: column; /*gap: 5px; */}
.nb-nav a { display: flex; align-items: center; gap: 15px; padding: 15px 30px; color: rgba(255,255,255,0.6); text-decoration: none !important; font-size: 14px; font-weight: 500; border-left: 4px solid transparent; transition: 0.3s; }
.nb-nav a:hover, .nb-nav a.active { color: #fff; background: rgba(210, 173, 91, 0.1); border-left-color: var(--nuil-primary); }
.nb-nav a.active i { color: var(--nuil-primary); }
.nb-sidebar-footer { padding: 20px 30px; border-top: 1px solid rgba(255,255,255,0.05); }

/* Masaüstünde gizli mobil elemanları */
.nb-mobile-toggle, .nb-sidebar-overlay { display: none; }

/* --- 5. MODALLAR VE FORMLAR --- */
.modal {
    display: none; position: fixed !important; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px);
    justify-content: center; align-items: center; z-index: 999999 !important;
}
.modal-content { 
    background: #fff; padding: 30px; border-radius: 20px; width: 90%; max-width: 500px; 
    position: relative; animation: modalAppear 0.3s ease-out; z-index: 1000000 !important; box-sizing: border-box;
    max-height: 90vh; overflow-y: auto; transform: translateY(-20px);
}
@keyframes modalAppear { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-header { font-size: 20px; font-weight: 800; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; color: var(--nuil-dark); display: flex; align-items: center; gap: 10px; }
.modal-header h3 { margin: 0 !important; color: #1e293b !important; }
.modal-footer { margin-top: 25px; border-top: 2px solid #f1f5f9; padding-top: 20px; display: flex; gap: 10px; }

.nb-input-group { margin-bottom: 15px; }
.nb-label { font-size: 12px; font-weight: 700; color: var(--nuil-dark); display: block; margin-bottom: 5px; }
.nb-input, input[type="text"], input[type="password"], textarea { width: 100%; padding: 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 14px; box-sizing: border-box; background: #fdfdfd; text-transform: none !important; }
.nb-input:focus { border-color: var(--nuil-primary); outline: none; background: #fff; }

.nb-btn-save { background: var(--nuil-primary); color: #fff; border: none; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.3s; /*flex: 1*/; text-align: center;}
.nb-btn-save:hover { background: var(--nuil-secondary); }
.nb-btn-cancel { background: #f3f4f6; color: #374151; border: none; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.3s; flex: 1; text-align: center;}
.nb-btn-cancel:hover { background: #e5e7eb; }
.nb-btn-secondary { background: #fff; border: 1px solid #e2e8f0; color: #64748b; padding: 10px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.nb-btn-danger-icon { background: #fee2e2; border: none; color: #ef4444; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.nb-btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; color: #6b7280; }
.nb-btn-icon:hover { color: var(--nuil-primary); }

/* Form Hataları */
.nb-error-text { color: #ef4444; font-size: 11px; font-weight: 600; margin-top: 4px; display: none; }
.nb-input.input-error { border-color: #ef4444 !important; background-color: #fef2f2 !important; animation: shake 0.3s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

/* Arama Dropdown */
.nb-table-search { display:flex; padding: 5px; width: 100%; }
.fa-magnifying-glass {padding: 5px;}
.nb-search-dropdown { position: absolute; background: #fff; border: 1px solid #eee; width: 100%; max-height: 200px; overflow-y: auto; z-index: 100; box-shadow: 0 10px 15px rgba(0,0,0,0.05); border-radius: 10px; margin-top: 5px; }
.nb-search-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #f9f9f9; font-size: 13px; }
.nb-search-item:hover { background: #f0fdf4; color: var(--nuil-primary); }

/* Toast Bildirim */
#nb-toast { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 10px; padding: 16px; position: fixed; z-index: 1000000; left: 50%; bottom: 30px; font-size: 15px; transform: translateX(-50%); box-shadow: 0 5px 15px rgba(0,0,0,0.2); font-weight: 600; }
#nb-toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }

/* --- 6. TABLOLAR, SEKMELER VE LİSTELER --- */
.nb-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; margin-bottom: 15px; background: #fff; }
.nb-table { width: 100%; border-collapse: collapse; min-width: 750px; }
.nb-table th { background: #f9fafb; padding: 15px; text-align: left; font-size: 11px; font-weight: 800; color: #64748b; border-bottom: 2px solid #e5e7eb; }
.nb-table td { padding: 15px; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: var(--nuil-dark); white-space: nowrap; }
.nb-table tr:hover { background: #fcfcfc; }

.nb-tabs-wrapper { display: flex; background: #f8fafc; border-bottom: 1px solid #e2e8f0; width: 100%; border-radius: 10px 10px 0 0; overflow: hidden; }
.nb-tab-btn { flex: 1; text-align: center; padding: 15px; border: none; background: none; font-weight: 600; color: #64748b; cursor: pointer; transition: 0.2s; border-bottom: 3px solid transparent; }
.nb-tab-btn:hover { background: #f1f5f9; }
.nb-tab-btn.active { color: var(--nuil-primary); border-bottom-color: var(--nuil-primary); background: #fff; }
.nb-tab-content { display: none; padding: 20px 0; }
.nb-tab-content.active-tab-content { display: block; }

.nb-users-action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 15px; flex-wrap: wrap; width: 100%; }
.nb-users-filters { display: flex; gap: 10px; flex: 1; }
.nb-users-filters .nb-input-group { margin: 0; flex: 1; }
.nb-role-select-group { width: 200px; flex: none; }

.nb-roles-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 25px; width: 100%; }
.nb-permissions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px; }

/* Profil ve Rozetler */
.nb-avatar-circle { width: 35px; height: 35px; background: var(--nuil-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.nb-profile-avatar-lg { width: 60px; height: 60px; background: var(--nuil-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; }

.nb-segment-badge { font-size: 10px; padding: 3px 8px; border-radius: 10px; vertical-align: middle; letter-spacing: 1px; }
.nb-segment-badge.vip { background: #000; color: #D2AD5B; border: 1px solid #D2AD5B; }
.nb-segment-badge.yeni { background: #e0f2fe; color: #0284c7; }
.nb-segment-badge.standart { background: #f1f5f9; color: #64748b; }
.nb-segment-badge.sorunlu { background: #fee2e2; color: #ef4444; }

.bg-green { background-color: #10b981 !important; color: white !important; padding: 3px 8px !important; border-radius: 4px; font-size: 11px;}
.bg-red { background-color: #ef4444 !important; color: white !important; padding: 3px 8px !important; border-radius: 4px; font-size: 11px;}
.bg-orange { background-color: #f59e0b !important; color: white !important; padding: 3px 8px !important; border-radius: 4px; font-size: 11px;}
.bg-blue { background-color: #0284c7 !important; color: white !important; padding: 3px 8px !important; border-radius: 4px; font-size: 11px;}
.bg-purple { background-color: #6d28d9 !important; color: white !important; padding: 3px 8px !important; border-radius: 4px; font-size: 11px;}

/* Paket Kartı */
.nb-package-card { border: 1px solid #f1f5f9; padding: 15px; border-radius: 12px; background: #fff; }
.pkg-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.pkg-progress { height: 6px; background: #f1f5f9; border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
.pkg-bar { height: 100%; background: var(--nuil-primary); }
.pkg-meta { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; }

/* AI Butonu ve Upload Zone */
.nb-ai-opt-btn { display: flex; align-items: center; gap: 15px; padding: 18px; border: 1px solid #e2e8f0; background: #fff; border-radius: 12px; cursor: pointer; text-align: left; width: 100%; transition: 0.2s; }
.nb-ai-opt-btn:hover { border-color: #8b5cf6; background: #f5f3ff; transform: translateY(-2px); }
.nb-ai-opt-btn i { font-size: 20px; color: #8b5cf6; }
.nb-ai-opt-btn small { color: #94a3b8; display: block; }

.nb-upload-zone { border: 2px dashed #e2e8f0; border-radius: 12px; padding: 30px; text-align: center; cursor: pointer; background: #f8fafc; transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.nb-upload-zone:hover, .nb-upload-zone.drag-active { border-color: #D2AD5B; background: #fffdf5; transform: scale(1.02); }
.nb-upload-zone i { font-size: 28px; color: #94a3b8; }
.nb-upload-zone span { font-size: 13px; font-weight: 600; color: #475569; }
.nb-photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; width: 100%; margin-top: 15px; }

/* --- 7. TAKVİM (DAYPILOT) ÖZELLEŞTİRMELERİ --- */
.nb-calendar-wrapper, .nuil-calendar-container, #nb-full-calendar { width: 100%; background: #fff; border-radius: 15px; box-sizing: border-box; overflow: hidden; }
.nb-calendar-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }

.nuil-calendar-container { height: auto !important; max-height: none !important; overflow-y: visible !important; overflow-x: auto; min-height: 800px; padding-bottom: 50px; -webkit-overflow-scrolling: touch; }
.nb-calendar-wrapper #nb-full-calendar { border: 1px solid #e2e8f0 !important; overflow: hidden !important; background-color: #fff !important; }
#nb-full-calendar .calendar_default_main, #nb-full-calendar .calendar_default_scroll, #nb-full-calendar > div:nth-child(2) { overflow: hidden !important; height: 100% !important; max-height: 100% !important; border: none !important; }

.calendar_default_colheader_inner { background: #D2AD5B !important; color: #fff !important; font-size: 13px !important; font-weight: 600 !important; height: 40px !important; display: flex !important; align-items: center !important; justify-content: center !important; border: none !important; }
.calendar_default_rowheader_inner { background: #fcfaf7 !important; color: #5d4d37 !important; display: flex !important; align-items: center !important; justify-content: center !important; font-weight: bold !important; height: 25px !important; border-bottom: 1px solid #eee !important; box-sizing: border-box !important;}
.calendar_default_cell { height: 25px !important; box-sizing: border-box !important;}
.calendar_default_event_inner { background: #fdf8f3 !important; border: 1px solid #e0d5c8 !important; border-left: 4px solid #D2AD5B !important; border-radius: 6px !important; color: #5d4d37 !important; padding: 5px !important; font-size: 11px !important; line-height: 1.2; }
.calendar_default_main { border: none !important; }

.view-btn { padding: 8px 15px; border: 1px solid #D2AD5B; background: transparent; color: #D2AD5B; border-radius: 6px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.view-btn.active { background: #D2AD5B; color: white; }
#nb-datepicker { border: 1px solid #e0d5c8; background: #fdf8f3; color: #5d4d37; }
.nb-nav-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #D2AD5B; background: #fff; color: #D2AD5B; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.nb-nav-btn:hover { background: #D2AD5B; color: #fff; }

.nb-btn-manage-rooms { background: var(--nuil-dark); border: 1px solid var(--nuil-primary); color: var(--nuil-primary); padding: 10px 20px; font-size: 12px; font-weight: 700; border-radius: 10px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 8px; height: 42px; }
.nb-btn-manage-rooms:hover { background: var(--nuil-primary); color: #fff; transform: translateY(-2px); }

/* Özel Tablo (Dashboard Grid) */
.nb-grid-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.nb-grid-table td { height: 38px !important; border: 1px solid #e2e8f0; padding: 2px !important; }
.nb-grid-table th { background: #f8fafc; color: #D2AD5B; padding: 10px; border-radius: 6px; border: 1px solid #e2e8f0; font-size: 12px; text-align: center; }
@media (max-width: 768px) {.nb-grid-table th {vertical-align: middle ; min-width: 20px !important; max-width: 20px !important;}}
.grid-time { width: 60px; font-size: 11px; background: #f8fafc; color: #64748b; text-align: center; font-weight: bold; position: sticky; left: 0; z-index: 10; border-right: 2px solid #e2e8f0 !important; }
.grid-cell { height: 50px; border: 1px dashed #cbd5e1; border-radius: 6px; transition: 0.2s; position: relative; vertical-align: middle; text-align: center; }
.grid-cell.empty { color: #e2e8f0; transition: all 0.2s; }
.grid-cell.empty:hover { background: #fdfaf3; color: #D2AD5B; }
.grid-app-box { margin: 1px; padding: 4px 6px; font-size: 11px; line-height: 1.2; height: calc(100% - 2px); border-radius: 6px; color: #fff; cursor: pointer; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.grid-app-box:hover { transform: scale(1.02); }
.app-card-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 9px; opacity: 0.9; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 2px; }
.app-card-name { font-weight: 800; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.app-card-service { font-size: 10px; opacity: 0.85; font-style: italic; }
.grid-app-wait { background: #d2ad5b; } 
.grid-app-done { background: #10b981; }

.flatpickr-calendar.static { top: 100% !important; left: 50% !important; transform: translateX(-50%) !important; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important; border: 1px solid #e0d5c8 !important; margin-top: 10px; z-index: 99999; }
.flatpickr-calendar.static:before, .flatpickr-calendar.static:after { left: 50% !important; margin-left: -5px !important; }

/* --- 8. MÜŞTERİ PANELİ ÖZEL STİLLERİ --- */
#nb-client-panel-wrapper { background: #f1f5f9; min-height: 100vh; width: 100%; padding: 20px 0; color: #334155; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
#nb-client-panel-wrapper .container { max-width: 1200px !important; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
#nb-client-panel-wrapper .profile-header { background: linear-gradient(135deg, #9e7c32 0%, #D2AD5B 100%); color: white; padding: 30px; border-radius: 20px; margin-bottom: 25px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(158, 124, 50, 0.2); }
#nb-client-panel-wrapper .profile-header h2 { color: #fff !important; margin: 0; font-size: 26px; }
#nb-client-panel-wrapper .profile-header p { margin: 5px 0 0; opacity: 0.9; }

#nb-client-panel-wrapper .header-actions { display: flex; gap: 10px; }
#nb-client-panel-wrapper .action-btn { background: rgba(255,255,255,0.2); color: white; padding: 10px 18px; border-radius: 12px; font-size: 14px; transition: 0.3s; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; text-decoration: none;}
#nb-client-panel-wrapper .action-btn:hover { background: rgba(255,255,255,0.3); }
#nb-client-panel-wrapper .logout-btn { background: rgba(239, 68, 68, 0.4); }

#nb-client-panel-wrapper .info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 25px; }
#nb-client-panel-wrapper .info-card { background: white; padding: 25px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
#nb-client-panel-wrapper .info-card .label { font-size: 12px; color: #64748b; font-weight: 700; letter-spacing: 0.5px; }
#nb-client-panel-wrapper .info-card .value { font-size: 22px; font-weight: 800; margin-top: 5px; }
#nb-client-panel-wrapper .info-card i { font-size: 35px; color: #D2AD5B; opacity: 0.25; }

#nb-client-panel-wrapper .tabs { background: white; border-radius: 15px 15px 0 0; display: flex; border-bottom: 1px solid #eef2f6; }
#nb-client-panel-wrapper .tab-btn { flex: 1; padding: 20px; border: none; background: none; cursor: pointer; font-weight: 700; color: #94a3b8; transition: 0.3s; border-bottom: 3px solid transparent; }
#nb-client-panel-wrapper .tab-btn.active { color: #D2AD5B; border-bottom-color: #D2AD5B; }
#nb-client-panel-wrapper .tab-content { background: white; padding: 25px; border-radius: 0 0 15px 15px; min-height: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }

#nb-client-panel-wrapper .item-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid #f8fafc; }
#nb-client-panel-wrapper .item-title { display: block; font-weight: 700; color: #334155; }
#nb-client-panel-wrapper .item-date { display: block; font-size: 12px; color: #D2AD5B; font-weight: 600; }
#nb-client-panel-wrapper .badge { padding: 6px 12px; border-radius: 10px; font-size: 11px; font-weight: 800; }

.nb-tabs-wrapper {justify-content: flex-start !important; flex-wrap: wrap !important; /* Ekrana sığmazsa alt satıra iner */ }
.nb-tab-btn { flex: none !important; width: auto !important; padding: 12px 25px !important; white-space: nowrap !important; }

.finance-row { cursor: pointer; transition: all 0.2s; border-bottom:1px solid #f1f5f9; }
.finance-row:hover { background-color: #f8fafc !important; transform: translateX(5px); box-shadow: -3px 0 0 #3b82f6; }

/* --- 9. 📱 KUSURSUZ MOBİL MİMARİ (TEK MERKEZ - ZIRHLI) --- */
@media screen and (max-width: 782px) {
    
    /* 1. TAŞMALARI VE EKRAN PARÇALANMASINI ENGELLE */
    html, body { overflow-x: hidden !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .nuil-main-container { display: block !important; width: 100vw !important; overflow-x: hidden !important; }
    
    /* 2. İÇERİK ALANI VE KARTLAR */
    .nb-content { padding: 15px 10px !important; padding-top: 85px !important; width: 100vw !important; box-sizing: border-box !important; margin: 0 !important; overflow-x: hidden !important; }
    .nb-card { padding: 15px !important; width: 100% !important; max-width: 100vw !important; border-radius: 15px !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box !important; overflow: auto; }

    /* 3. MOBİL HAMBURGER MENÜ VE SİDEBAR */
    .nb-sidebar { position: fixed !important; left: -280px !important; top: 0; bottom: 0; width: 260px !important; z-index: 1000002 !important; box-shadow: 5px 0 15px rgba(0,0,0,0.2); transition: all 0.3s ease-in-out !important; }
    .nb-sidebar.active { left: 0 !important; }
    
    .nb-mobile-toggle { 
        display: flex !important; position: fixed !important; top: 15px !important; right: 15px !important; bottom: auto !important;
        width: 48px !important; height: 48px !important; background: var(--nuil-primary) !important; color: white !important; 
        border-radius: 12px !important; align-items: center !important; justify-content: center !important; 
        font-size: 20px !important; z-index: 1000001 !important; box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important; cursor: pointer; border: none !important;
    }
    
    .nb-sidebar-overlay { 
        display: none; position: fixed !important; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; 
        background: rgba(0,0,0,0.6) !important; z-index: 1000000 !important; backdrop-filter: blur(3px); 
    }
    .nb-sidebar-overlay.active { display: block !important; }

    /* 4. INLINE GRİDLERİ VE YAN YANA ELEMANLARI ALT ALTA AL */
    .nb-action-row, .nb-stat-grid, .nb-roles-layout, .nb-permissions-grid,
    .nb-content div[style*="display:grid"], .nb-content div[style*="display: grid"],
    .nb-users-action-bar, .nb-users-filters /*div[style*="justify-content:space-between"]*/ {
        display: flex !important; flex-direction: column !important; width: 100% !important; gap: 12px !important; align-items: stretch !important; grid-template-columns: 1fr !important;
    }

    .nb-view-header { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; margin-top: 15px !important; gap: 10px !important;}
    .nb-view-header div[style*="text-align:right"] { width: 100% !important; text-align: left !important; }

    /* Inputlar ve Butonlar Tam Genişlikte */
    .nb-role-select-group, #user_search_input, #role_filter_select, .nb-btn-save, .nb-btn-secondary, .nb-btn-danger-icon { 
        width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; justify-content: center !important; margin: 0 !important; display: block !important; margin-bottom: 5px !important;
    }

    /* 5. 🛡️ TABLO VE TAKVİM İÇİN SİHİRLİ KAYDIRMA (Taşmayı Önler) */
    .nb-table-responsive, .nb-tab-content, .nb-calendar-wrapper, .nuil-calendar-container, #nb-full-calendar, div[style*="overflow:hidden"], .nb-table-container {
        width: 100% !important; max-width: calc(100vw - 20px) !important; overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch !important; box-sizing: border-box !important;
    }
    .nb-table { min-width: 700px !important; width: 100% !important; margin: 0 !important;}
    .nb-table th, .nb-table td { white-space: nowrap !important; padding: 12px 10px !important; font-size: 13px !important; }

    /* Takvim Kontrolleri */
    .nb-calendar-controls, .nb-calendar-header, .nb-calendar-controls {
        flex-direction: column !important; align-items: stretch !important; gap: 10px !important;
    }

    /* 6. SEKMELER (TABS) ALT ALTA */
    .nb-tabs-wrapper { flex-wrap: wrap !important; border-bottom: none !important; }
    .nb-tab-btn { flex: 1 1 100% !important; text-align: left !important; padding: 12px 15px !important; border-left: 3px solid transparent !important; border-bottom: 1px solid #e2e8f0 !important; }
    .nb-tab-btn.active { border-left-color: var(--nuil-primary) !important; border-bottom-color: #e2e8f0 !important; }

    /* 7. MODALLAR EKRANA SIĞSIN */
    .modal-content { width: 95% !important; padding: 20px !important; margin: 10px auto !important; }

    /* 8. MÜŞTERİ PANELİ ÖZEL MOBİL */
    #nb-client-panel-wrapper .profile-header { flex-direction: column; text-align: center; gap: 15px; }
    #nb-client-panel-wrapper .header-actions { width: 100%; justify-content: center; margin-top: 10px; }
    #nb-client-panel-wrapper .tab-btn { flex: 1 1 50% !important; font-size: 12px; text-align: center !important; padding: 15px 10px !important; }
    #nb-client-panel-wrapper .tab-btn span { display: none; }

    .nb-urun-ekle { display:contents !important;}
    .nb-urun-arama { display:block !important; }
    .nb-view-header-buton {display: contents !important; }
    .nb-user-buton  { display: contents !important; }
    .nb-user-buton  .nb-tab-content { display: block !important; }
}

/* ==========================================================================
   MOBİL ÖZEL: BEYAZ STICKY HEADER VE LOGO
   ========================================================================== */
@media screen and (max-width: 782px) {
    
    /* 1. Sanal Header Arka Planı ve Logonun Eklenmesi */
    .nb-portal-active .nuil-main-container::before {
        content: '';
        position: fixed;
        top: 0; 
        left: 0; 
        right: 0;
        height: 70px;
        background-color: #ffffff;
        /* Logonun URL'si - Gerekirse değiştirebilirsin */
        background-image: url('https://nuilbeauty.com/wp-content/uploads/2025/12/11-LOGO_YATAY_RENKLI.png');
        background-repeat: no-repeat;
        background-position: 20px center; /* Soldan 20px içeride ve dikeyde ortalı */
        background-size: 130px auto; /* Logonun büyüklüğü */
        z-index: 1000000;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    /* 2. Hamburger Menü İkonu (Sağ Üste Header İçine Oturtma) */
    .nb-portal-active .nb-mobile-toggle {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        background: var(--nuil-primary) !important;
        color: white !important;
        border-radius: 12px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 20px !important;
        z-index: 1000001 !important; /* Header'ın bir tık üstünde, tıklanabilir kalsın */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border: none !important;
        cursor: pointer;
    }

    /* 3. Sayfa İçeriğini Header'ın Altına İtme */
    .nb-portal-active .nb-content {
        padding-top: 90px !important; /* 70px header + 20px boşluk */
    }
}

/* ==========================================================================
   MÜŞTERİ PANELİ: MOBİL LOGOLU HEADER (STICKY)
   ========================================================================== */
@media screen and (max-width: 782px) {
    
    /* Müşteri Paneli Header Alanı */
    #nb-client-panel-wrapper::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 75px;
        background-color: #ffffff;
        /* Logonun URL'sini buradan kontrol edebilirsin */
        background-image: url('https://nuilbeauty.com/wp-content/uploads/2025/12/11-LOGO_YATAY_RENKLI.png');
        background-repeat: no-repeat;
        background-position: center; /* Logoyu mobilde tam ortalıyoruz, çok daha kreatif durur */
        background-size: 140px auto;
        z-index: 9998; /* Modalların (9999) altında kalmalı */
        border-bottom: 1px solid #f1f5f9;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    }

    /* Müşteri Paneli İçeriğini Header Kadar Aşağı İt */
    #nb-client-panel-wrapper {
        padding-top: 85px !important;
    }

    /* Müşteri tarafında varsa çıkış butonu veya profil ikonunu sağa sabitleme */
    .nb-client-logout-btn {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 9999 !important;
    }
}

/* Yaratıcı Dokunuş: Masaüstünde Logo */
@media screen and (min-width: 783px) {
    #nb-client-panel-wrapper::before {
        content: '';
        display: block;
        width: 100%;
        height: 120px;
        margin: 0 auto 30px auto;
        background-image: url('https://nuilbeauty.com/wp-content/uploads/2025/12/11-LOGO_YATAY_RENKLI.png');
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
}

#nb-client-panel-wrapper .nb-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
#nb-client-panel-wrapper .nb-modal-content {
    background: white;
    padding: 35px;
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
}

/* SERVICES.PHP Dosyasındaki CSS'ler */        
.nb-tab-btn { background:transparent; border:none; padding:15px 30px; font-weight:700; color:#64748b; cursor:pointer; border-bottom:3px solid transparent; }
.nb-tab-btn.active { color:var(--nuil-primary); border-bottom-color:var(--nuil-primary); background:#fff; }
.cat-item { padding:10px 15px; background:#fff; border:1px solid #f1f5f9; border-radius:8px; margin-bottom:10px; font-weight:600; font-size:13px; cursor:pointer; transition:0.2s; }
.cat-item:hover, .cat-item.active { transform:translateX(5px); border-color:var(--nuil-primary) !important; background:#f8fafc; color:var(--nuil-primary); }
.nb-service-card { background:#fff; border:1px solid #f1f5f9; border-radius:12px; padding:15px; display:flex; align-items:center; gap:15px; transition:0.2s; }
.nb-service-card:hover { border-color:var(--nuil-primary); box-shadow:0 5px 15px rgba(0,0,0,0.05); }
.srv-badge { width:35px; height:35px; border-radius:8px; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px; }
.nb-btn-icon-sm { background:none; border:none; color:#cbd5e1; cursor:pointer; }
.nb-btn-icon-sm:hover { color:#ef4444; }


input[type="text"], 
input[type="search"], 
input[type="number"], 
textarea, 
.nb-input, 
.nb-input::placeholder,
#app_cust_name, 
#app_cust_name::placeholder {
    text-transform: none !important;
    font-variant: normal !important;
}

/* Placeholder (Müşteri ara... gibi yazılar) için özel serbest bırakma */
::-webkit-input-placeholder { text-transform: none !important; }
::-moz-placeholder { text-transform: none !important; }
:-ms-input-placeholder { text-transform: none !important; }
:-moz-placeholder { text-transform: none !important; }

/** SÜRÜKLE BIRAK İÇİN DEĞİŞEN KUTU RENGİ **/ 
.nb-dropzone.drag-active {
    background: #f1f5f9 !important;
    transform: scale(0.98);
}

@media print {
    /* 1. WordPress menülerini ve gereksiz barları tamamen yok et */
    #adminmenumain, #wpadminbar, #adminmenuback, #adminmenuwrap { 
        display: none !important; 
    }
    
    /* 2. Ekrandaki diğer her şeyi görünmez yap */
    body * { 
        visibility: hidden; 
    }
    
    /* 3. SADECE raporu ve içindekileri görünür yap */
    #finance_report_container, #finance_report_container * { 
        visibility: visible; 
    }
    
    /* 4. Raporu kağıdın en sol üstüne tam sayfa olarak oturt */
    #finance_report_container { 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        margin: 0 !important; 
        border: none !important; 
        box-shadow: none !important;
    }
    
    /* 5. Yazdır butonunun kağıtta çıkmasını engelle */
    .nb-print-hidden { 
        display: none !important; 
    }
}

/* Oda Modalı İçin Hayat Kurtaran Katman Ayarı */
/* MODAL HACİM ZIRHLAMASI */
#roomModal {
    display: none; /* JS ile açılacak */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;  /* Tarayıcı genişliği kadar */
    height: 100vh !important; /* Tarayıcı yüksekliği kadar */
    background: rgba(0, 0, 0, 0.75) !important;
    z-index: 9999999 !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#roomModal .modal-content {
    width: 400px !important; /* Genişliği sabitle */
    min-height: 200px !important;
    background: #ffffff !important;
    padding: 25px !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
    display: block !important;
}

/* TÜM MODALLAR İÇİN HACİM GARANTİSİ */
#newCustomerModal, #sellPackageModal, #paymentModal, #appointmentModal, #productModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    /*z-index: 9999999 !important;*/
    display: none; /* JS tarafından flex yapılacak */
    background: rgba(15, 23, 42, 0.7) !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-content {
    min-width: 350px !important;
    min-height: 200px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.nb-btn-ai { background: linear-gradient(135deg, #8b5cf6 0%, #d8b4fe 100%); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition:0.2s; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.nb-btn-ai:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); }
.nb-ai-opt { background: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; border-radius: 10px; cursor: pointer; transition: 0.2s; color: #475569; font-size:12px; font-weight:600; }
.nb-ai-opt i { font-size: 20px; margin-bottom: 8px; display:block; color: #8b5cf6; }
.nb-ai-opt:hover { border-color: #8b5cf6; background: #f3e8ff; color: #6b21a8; transform:scale(1.05); }

/* Notların içindeki gereksiz satırları ve tireleri gizlemek/temizlemek için */
.note-item {
    background: #fffdf7 !important;
    border: 1px solid #f1e6d0 !important;
    border-left: 4px solid #D2AD5B !important;
    padding: 12px;
    border-radius: 8px;
    position: relative;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap !important; /* Alt satırları korur */
}

.note-content-text {
    margin-right: 40px; /* İkonlara yer aç */
}

.note-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 8px;
}

.note-actions i {
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.note-actions .fa-pen-to-square { color: #3b82f6; }
.note-actions .fa-trash { color: #ef4444; }
.note-actions i:hover { transform: scale(1.2); }
/* Mobil uyumluluk için grid ayarı */
@media (max-width: 480px) {
    #note_measure_area div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ZEBRA VE KOMPAKT TABLO TASARIMI */
    .nb-log-table { width: 100%; border-collapse: collapse; font-family: 'Inter', sans-serif; background: #fff; }
    .nb-log-table th { padding: 8px 10px; font-size: 11px; color: #475569; background: #f8fafc; border-bottom: 2px solid #e2e8f0; text-transform: uppercase; text-align: left; }
    .nb-log-table td { padding: 6px 10px; font-size: 12px; color: #334155; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
    .nb-log-table tbody tr:nth-child(even) { background-color: #f8fafc; } /* Zebra Gri Satır */
    .nb-log-table tbody tr:nth-child(odd) { background-color: #ffffff; }  /* Zebra Beyaz Satır */
    .nb-log-table tbody tr:hover { background-color: #f1f5f9; }
    .nb-log-badge { padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; display: inline-block; white-space: nowrap; }


/* SİSTEM KAYITLARI STİLLERİ */
.nb-log-filter-wrap {display: none;}
.nb-log-filter-wrap.active {display: block;}
.nb-log-filter-row {display: grid; gap: 12px; margin-bottom: 12px;}
.nb-log-filter-row.top {grid-template-columns: 1fr 1fr 1fr 1fr auto;align-items: end;}
.nb-log-filter-row.bottom {grid-template-columns: 1fr 1fr;}
.nb-log-filter-actions {display: flex;gap: 10px;justify-content: flex-end;flex-wrap: wrap;}
@media (max-width: 1200px) { .nb-log-filter-row.top {grid-template-columns: 1fr 1fr;} .nb-log-filter-actions {grid-column: 1 / -1; justify-content: flex-start;} }
@media (max-width: 768px) { .nb-log-filter-row.top, .nb-log-filter-row.bottom {grid-template-columns: 1fr;} .nb-log-filter-actions {justify-content: flex-start;} }
