﻿/* ===================================================================
   GLOBAL FORM STYLES - CLEAN & FINAL VERSION (V6)
   =================================================================== */

/* ===== 1. ROOT VARIABLES ===== */
:root {
  /* Renk Paleti */
  --primary-color: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --primary-gradient-hover: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  
  --accent-color: #22d3ee;
  --danger-color: #dc3545;
  --warning-color: #f59e0b;
  --info-color: #0ea5e9;
  
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  
  --light-bg: #f9fafb;
  --border-color: #e5e7eb;
  
  /* Yapısal */
  --border-radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
}

/* ===== 2. BASE & UTILITIES ===== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background: #fff;
}

.text-primary { color: var(--primary-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

/* ===== 3. FORM CONTROLS ===== */
.form-group {
  margin-bottom: 24px;
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 8px 12px;
  font-size: 14px;
  transition: var(--transition);
  height: 42px !important;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  outline: none;
}

/* Readonly Input Stili */
.form-control[readonly], .form-control[disabled] {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

/* Label Wrapper */
.label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
  min-height: 21px;
}

.label-wrapper .form-label {
  margin-bottom: 0 !important;
  white-space: nowrap;
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #4b5563;
  display: block;
}

.required-field::after {
  content: "*";
  color: var(--danger-color);
  margin-left: 4px;
}

.invalid {
  border-color: var(--danger-color) !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

/* ===== 4. BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--border-radius);
  padding: 0 20px;
  height: 42px !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  transition: var(--transition);
}

.btn i { font-size: 1.1em; margin-right: 8px; }

/* --- ANA İŞLEM BUTONLARI (MAVİ GRADIENT) --- */
.btn-submit, 
.btn-primary, 
.btn-submit-large,
#mersisButton, 
#personelButton,
#araButton,        
#talepOlusturButton {
  background: var(--primary-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35); 
  text-shadow: none;
}

.btn-submit:hover, 
.btn-primary:hover, 
.btn-submit-large:hover,
#mersisButton:hover, 
#personelButton:hover,
#araButton:hover,       
#talepOlusturButton:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5);
}

/* Özel Genişlik Ayarları */
#mersisButton { width: 100%; max-width: 140px; }
#personelButton { width: 100%; }
#araButton { width: 100%; }

/* Büyük Submit Butonu */
.btn-submit-large {
    padding: 0 40px;
    height: 48px !important;
    font-size: 16px;
    border-radius: var(--border-radius);
    outline: none !important;
    border: none !important;
}

/* Focus ve Active için de outline kaldır */
.btn-submit-large:focus,
.btn-submit-large:active {
    outline: none !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
}

/* İkincil Butonlar */
.btn-secondary {
  background-color: #fff;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

/* Danger Buton */
.btn-danger {
  background-color: var(--danger-color);
  color: white;
}
.btn-danger:hover { background-color: #b91c1c; }

/* Gruplamalar */
.button-group {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 15px;
}

.submit-area {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 0 20px;  /* sağ ve sol boşluk eklendi */
    margin-bottom: 20px;       /* alttan boşluk */
}

/* ===== 5. PAGE LAYOUT & CARDS ===== */
.fullwidth-grid-page .page-content { padding: 12px 16px; }

.main-content {
  padding: 20px;
  background-color: #f3f4f6;
  min-height: calc(100vh - 60px);
}

.main-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  width: 95%;
  max-width: 1400px;
  margin: 20px auto;
}

/* Header */
.main-card .page-header, 
.fullwidth-grid-page .portlet-title {
  background: var(--primary-gradient);
  padding: 20px 25px; 
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fullwidth-grid-page .portlet-title {
  padding: 18px 24px;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  box-shadow: var(--shadow-md);
}
.fullwidth-grid-page .portlet-title .caption { display: flex; align-items: center; gap: 10px; color: #fff; }
.fullwidth-grid-page .portlet-title .caption::before { content: ""; width: 5px; height: 26px; background-color: var(--accent-color); border-radius: 2px; }

.main-card .page-title, 
.fullwidth-grid-page .page-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}
.main-card .page-description { margin: 5px 0 0 0; opacity: 0.85; font-size: 0.9rem; }

/* Sections */
.info-section, .form-section { padding: 25px 30px; background-color: #fff !important; }
.info-section { border-bottom: 1px solid #f0f0f0; background-color: #fcfdff !important; }

/* Form Başlıkları */
.form-section h6 {
  color: #4f46e5;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef2ff;
  display: flex;
  align-items: center;
  background: transparent !important;
}
.form-section h6 i { background: #eef2ff; padding: 8px; border-radius: 6px; margin-right: 10px; }

/* ===== 6. ACCORDION ===== */
.accordion-section {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  background: #fff;
  transition: var(--transition);
}
.accordion-section:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.03); border-color: #d1d5db; }

.accordion-header {
  background-color: #f8fafc;
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
}
.accordion-header:hover { background-color: #f1f5f9; }
.accordion-header.active { background-color: #eff6ff; border-bottom: 1px solid var(--border-color); }
.accordion-header .section-title { font-size: 1.05rem; font-weight: 600; color: #334155; margin: 0; }
.accordion-header.active .section-title { color: #4f46e5; }

.accordion-content { padding: 25px 30px; background: #fff; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 7. ALERTS & TEXTS ===== */
.form-note {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-align: right;
  max-width: 65%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.form-note.info { color: var(--primary-color); }
.form-note.warning { color: #d97706; }
.form-note i { font-size: 12px; }

.warning-text.important {
  background-color: #fffbeb;
  color: #b45309;
  border-radius: 4px;
  margin-top: 6px;
  padding: 6px 10px;
  display: inline-flex;
  font-size: 12px;
  align-items: center;
  gap: 6px;
}

.dummy-label { visibility: hidden; display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; }

/* ===== 8. GRID & MODALS & TABLES ===== */
.dx-datagrid { font-size: 13px; border-radius: var(--border-radius); }

/* Grid Header Filtre İkonu */
.dx-datagrid-headers .dx-header-filter {
    color: #ffffff !important;
    opacity: 0.9;
}
.dx-header-filter.dx-header-filter-filled {
    color: #facc15 !important; 
    opacity: 1;
}
.dx-datagrid-headers { background-color: var(--light-bg); font-weight: 600; color: #374151; }


/* --- SATIR YÜKSEKLİĞİ & HİZALAMA & ÜÇ NOKTA (...) --- */

/* Tüm hücreler için ortak ayarlar */
.dx-datagrid .dx-row > td,
.table > tbody > tr > td {
    padding: 6px 8px !important; /* Yüksekliği kontrol altına aldık */
    vertical-align: middle !important;
}

/* DevExtreme Grid'de metin taşması (Ellipsis) için kritik kural */
/* Hem TD hem de içindeki DIV/SPAN elementlerini kapsar */
.dx-datagrid-rowsview .dx-data-row td,
.dx-datagrid-rowsview .dx-data-row td > div,
.dx-datagrid-rowsview .dx-data-row td > span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%; /* Hücre dışına taşmayı engeller */
}

/* İSTİSNA: İşlemler Kolonu (Dropdown kesilmesin) */
.dx-datagrid-rowsview .dx-data-row td:last-child,
.dx-datagrid-rowsview .dx-data-row td[aria-colindex="last"],
.dx-command-edit,
.dx-command-edit > div {
    overflow: visible !important;
    max-width: none !important;
}

/* Hover Rengi */
.dx-datagrid-rowsview .dx-row.dx-data-row.dx-state-hover > td { 
    background-color: #e0e7ff !important; 
    color: #1f2937 !important;
}

/* --- AKSİYON BUTONLARI --- */
.action-cell-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.action-icon-btn {
    border: none;
    outline: none;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
}

/* 1. Renew Button (Mavi) */
.renew-btn { background-color: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.renew-btn:hover { background-color: #4f46e5; color: #ffffff; border-color: #4f46e5; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3); }

/* 2. Edit Button (Turuncu) */
.edit-btn { background-color: #fff7ed; color: #ea580c; border: 1px solid #ffedd5; }
.edit-btn:hover { background-color: #ea580c; color: #ffffff; border-color: #ea580c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3); }

/* 3. Delete Button (Kırmızı) */
.delete-btn { background-color: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.delete-btn:hover { background-color: #dc2626; color: #ffffff; border-color: #dc2626; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3); }

/* 4. Info Button (Kırmızı Info) */
.btn-info-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-info-danger:hover { background-color: #dc2626; color: white; border-color: #dc2626; }

/* 5. Detail Button (Mavi / İnceleme) */
.detail-btn {
  background-color: #eff6ff;        /* Açık mavi zemin */
  color: #2563eb;                   /* Mavi ikon / yazı */
  border: 1px solid #dbeafe;
  transition: all 0.2s ease-in-out;
}

.detail-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}


/* ===================================================================
   MODALS (CONFIRM, INPUT, DYNAMIC)
   =================================================================== */
.input-modal-overlay, .confirm-dialog-overlay, .dynamic-grid-modal-overlay {
  position: fixed; inset: 0; 
  background: rgba(15, 23, 42, 0.5); /* Hafif koyu */
  backdrop-filter: blur(3px); 
  display: flex; align-items: center; justify-content: center; 
  z-index: 9999;
}

/* DevExtreme notify (dxToast) mesajlarını modalın üzerine çıkar */
.dx-toast-wrapper,
.dx-toast,
.dx-toast-content {
    z-index: 20000 !important;
}


/* 1. Confirm Dialog */
.confirm-dialog { 
    background: #fff; border-radius: 12px; width: 90%; max-width: 450px; padding: 0; 
    overflow: hidden; animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-header { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #f1f5f9; background-color: #fff; }
.confirm-header h3 { font-size: 1.1rem; font-weight: 600; margin: 0; color: var(--text-dark); }
.confirm-icon { font-size: 24px; color: var(--primary-color); }
.confirm-body { padding: 24px; color: #4b5563; font-size: 15px; line-height: 1.6; }
.confirm-body p { margin: 0; }
.confirm-footer { padding: 16px 24px; background-color: #f8fafc; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 12px; }

/* 2. Input Modal */
.input-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; display: flex; flex-direction: column; overflow: hidden; }
.input-modal-body { max-height: 65vh; overflow-y: auto; }
.input-modal-footer { background-color: #f8fafc !important; border-top: 1px solid #e2e8f0 !important; padding: 16px 24px !important; display: flex; justify-content: flex-end; gap: 10px; }

/* 3. Dynamic Grid Modal */
.dynamic-grid-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    display: flex; flex-direction: column;
    overflow: hidden;
    border: none;
    width: 80%; max-width: 1200px; max-height: 80vh; position: fixed;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.dynamic-grid-modal-header {
    background: var(--primary-gradient);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
    cursor: move;
    user-select: none;
}
.dynamic-grid-modal-title {
    font-size: 1.15rem; font-weight: 600; color: #ffffff; letter-spacing: 0.4px; text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.dynamic-grid-modal-close {
    background: rgba(255, 255, 255, 0.15); border: none; color: #ffffff; width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s ease; font-size: 18px; line-height: 1;
}
.dynamic-grid-modal-close:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(90deg); }
.dynamic-grid-modal-body { background: #fff; }

@keyframes modalPop { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Responsive */
@media (max-width: 576px) {
  .label-wrapper { flex-direction: column; align-items: flex-start; gap: 2px; }
  .form-note { text-align: left; justify-content: flex-start; max-width: 100%; }
}

/* Sidebar Fix */
#kt_app_sidebar_footer .btn {
  background-color: rgba(255, 255, 255, 0.08); 
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #9ca3af; 
  box-shadow: none; 
}
#kt_app_sidebar_footer .btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* === DURUM BADGE GENEL === */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff !important;
    min-width: 60px;
    text-align: center;
    line-height: 18px;
    transition: all 0.15s ease-in-out;
    user-select: none;
}

/* === AKTİF BADGE === */
.status-active {
    background-color: #28a745;       /* Bootstrap success */
    border: 1px solid #1e7e34;
}

/* === PASİF BADGE === */
.status-passive {
    background-color: #dc3545;       /* Bootstrap danger */
    border: 1px solid #b21f2d;
}

/* === ASKIDA BADGE (PASİF GİBİ SOLID) === */
.status-pending {
    background-color: #f0ad4e;   /* Net, hoş bir turuncu-sarı */
    border: 1px solid #d39e00;
}



/* === PASİF TIKLANABİLİR === */
.clickable-status {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-status:hover {
    filter: brightness(1.15);
    transform: scale(1.06);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.35);
}

/* Pasif tıklanabilir badge */
.status-passive.clickable-status {
    position: relative;
    padding-left: 26px; /* ikona yer aç */
    cursor: pointer;
}

/* SOLDA BÜYÜK VE NET GÖZ İKONU */
.status-passive.clickable-status::before {
    content: "\f06e"; /* FA eye icon unicode */
    font-family: "Font Awesome 5 Free"; /* veya FA6 için: "Font Awesome 6 Free" */
    font-weight: 900; /* solid icon için */
    font-size: 14px;
    color: #fff; /* beyaz */
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

.boolean-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    min-width: 50px;
}

.boolean-badge-true {
    background-color: #28a745; /* yeşil */
}

.boolean-badge-false {
    background-color: #dc3545; /* kırmızı */
}

/* Pulse (nabız atan) Badge */
/* Input Güncellendi Arka Plan Rengi */
.input-updated {
    background-color: #e8f0ff !important;
    border-color: #b5c6ff !important;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Güncellendi Badge (Pulse) */
.update-badge-pulse {
    background: #467cf1;
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 20;
    opacity: 1;

    animation: pulseBadge 1.8s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%   { transform: scale(1);   box-shadow: 0 0 0px rgba(37, 99, 235, 0.5); }
    50%  { transform: scale(1.12); box-shadow: 0 0 10px rgba(37, 99, 235, 0.4); }
    100% { transform: scale(1);   box-shadow: 0 0 0px rgba(37, 99, 235, 0.5); }
}

/* Hücrenin tamamını yatayda ortala */
.talep-durumu-cell {
    text-align: center !important;
}

/* Badge */
.talep-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;          /* kalın font */
    background: #f3f3f3;       /* hafif gri arka plan */
    border: 1px solid #ddd;    /* ince çerçeve */
}

/* İkon kısmı */
.talep-badge-icon {
    margin-right: 6px;
    font-size: 15px;
    line-height: 1;
}

/* Yazı kısmı – istersen ayrıca stil verebilirsin */
.talep-badge-text {
    line-height: 1;
}


.input-modal-form textarea.form-control {
    height: auto !important;
    min-height: 70px !important;
    resize: vertical;
}
