/* =========================
   LIGHT THEME REFACTOR
   (Place at the end of CSS)
   ========================= */

:root{
  --bg: #F1F1F1;
  --surface: #ffffff;
  --surface-2: #fbfcff;
  --border: #e7eaf2;
  --border-2: #dde2ee;

  --text: #111827;
  --muted: #6b7280;

  --primary: #2563eb;
  --primary-600: #1d4ed8;

  --success: #2e6f40;
  --warning: #f59e0b;
  --danger:  #ef4444;

  --shadow-sm: 0 1px 2px rgba(17,24,39,.06);
  --shadow-md: 0 10px 28px rgba(17,24,39,.10);

  --radius: 4px;
  --radius-sm: 4px;

  --scroll-thumb: #bfc7d6;
  --scroll-thumb-hover: #aab3c5;
  --scroll-thumb-active: #97a2b8;
}

body{
  background:
    radial-gradient(900px 900px at 15% 10%, rgba(37,99,235,.10), transparent 55%),
    radial-gradient(900px 900px at 85% 20%, rgba(16,185,129,.07), transparent 55%),
    linear-gradient(180deg, #fff, var(--bg));
  color: var(--text);
}

html{ scroll-behavior: smooth; }
*{ scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover{ background: var(--scroll-thumb-hover); background-clip: content-box; }
::-webkit-scrollbar-thumb:active{ background: var(--scroll-thumb-active); background-clip: content-box; }
@media (hover: none) and (pointer: coarse){  ::-webkit-scrollbar{ width: 0; height: 0; } }


.mb0 { margin-bottom:0px; }
.alertify{
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text);
  border-radius: var(--radius);
  left: 16px;
  right: 16px;
  top: 16px;
  width: auto;
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 16px;
  z-index: 9999;
}

.alertify .fa{ width: 24px; height: 24px; line-height: 24px; font-size: 13px;border-radius: 999px;margin-right: 10px; text-align: center; }

.alertify.success{ background: rgba(46,111,64,.10); color: #11401f; border-color: rgba(46,111,64,.18); }
.alertify.success .fa{ background: #fff; color: var(--success); border: 1px solid rgba(46,111,64,.25);text-align:center; }

.alertify.error{ background: rgba(239,68,68,.10); color: #7a1e1e; border-color: rgba(239,68,68,.18); }
.alertify.error .fa{ background: #fff; color: var(--danger); border: 1px solid rgba(239,68,68,.25); text-align:center; }

.alertify.warning{ background: rgba(245,158,11,.12); color: #7a4a00; border-color: rgba(245,158,11,.22); }
.alertify.warning .fa{ background: #fff; color: var(--warning); border: 1px solid rgba(245,158,11,.25);text-align:center;  }

.sidebar{
  position: fixed;
  top: 40px; left: 30px; bottom: 30px;
  width: 300px;
  padding:0px 15px 15px 15px;
  display: flex; flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  z-index: 999;
}

.sidebar .logo{
    background: var(--surface-2);
  margin-left:-15px;
  margin-right:-15px;
  padding:30px 40px;
  text-align: center;
  border-bottom:1px solid #EEE;
  margin-bottom: 15px;
}

.sidebar .logo img { max-width:100%; }
.sidebar .form-control{
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  height: 42px;
}

.sidebar ul{ position: relative; overflow: auto; }
.sidebar ul li{ margin-bottom: 10px; }

.sidebar ul li a{
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--text);
  font-size: 14px;
  padding: 10px 15px 10px 40px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.sidebar ul li a:before{
  content:'TR';
  background: #0b4aa2;
  position: absolute;top:0;left:0;bottom:0;width:25px;
  display: flex;align-items: flex-end;justify-content: center;
  padding-bottom: 5px;font-size:12px;
  color:#FFF;
}
.sidebar ul li a:hover{
  background: #f2f5ff;
}

.sidebar ul li a:active{ transform: translateY(1px); }

.sidebar ul li small{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  color: var(--muted);
  font-size:13px;
}
.sidebar ul li a .fa{ margin-left: auto; opacity: .7; }

.sidebar .btn-new { margin-top:auto;text-align:center; }

.dropdown{ position: relative; display: inline-block; }

.dropdown-toggle{ cursor: pointer; }

.dropdown-menu{
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 180px;
  padding: 6px 0;
  margin: 6px 0 0;
  list-style: none;

  background: #fff;
  border: 1px solid #e7eaf2;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(17,24,39,.10);

  /* küçük animasyon hissi */
  transform: translateY(4px);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 9999;
}

.dropdown.open > .dropdown-menu{
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu > li > a{
  display: block;
  padding: 9px 14px;
  clear: both;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  text-decoration: none;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus{
  background: #f2f5ff;
  outline: none;
}


.dropdown-menu-right{
  right: 0;
  left: auto;
}



.profile{
  position: absolute; 
  top: 10px; right: 45px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
 gap:15px;
 font-size:13px;
 font-weight: 600;
}

.profile a { display:flex;align-items:center;justify-content:center;gap:5px;color:var(--muted);border-left:1px solid var(--border-2);padding-left:15px; }
.profile a:first-child{ border-left:0px; }

.tools{

  display: flex;
  align-items: center;
  padding:15px;
  margin-bottom: 30px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);

}

.tools .left{
  display: flex;
  gap:10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}


.tools .right{
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tools .right > *{ margin-left: 10px; }



/* ------------- Tables ------------- */
.table{
  width: 100% !important;
  max-width: 100% !important;
  border-spacing: 0;
  border-collapse: separate; /* rounded head/footer için */
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table > thead > tr > th,
.table > tfoot > tr > th{
  padding: 12px 16px;
  background: #f2f4fb;
  border-bottom: 1px solid var(--border);
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.table > tbody > tr > td{
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  color: #4b5563;
  background: var(--surface);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table > tbody > tr:hover > td{
  background: #fafbff;
}

.table > thead > tr > th:last-child,
.table > tbody > tr > td:last-child,
.table > tfoot > tr > th:last-child{
  text-align: right;
}

/* DataTables paginate */


.dataTables_top { display:grid;grid-template-columns:minmax(0,80%) minmax(0, 20%); gap:30px; }


.dataTables_wrapper { display:flex;flex-direction:column;gap:30px; }
.dataTables_wrapper .dataTables_info{
  padding-bottom:15px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.dataTables_wrapper .dataTables_paginate{
  font-size: 13px;
  text-align: center;
  padding-bottom: 18px;
}

.dataTables_paginate .paginate_button{
  display: inline-block;
  background: var(--surface);
  padding: 7px 10px;
  cursor: pointer;
  color: #374151;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  margin: 0 3px;
  transition: background .15s ease, border-color .15s ease;
}

.dataTables_paginate .paginate_button:hover{
  background: #f2f5ff;
  border-color: rgba(37,99,235,.22);
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.25);
  color: var(--primary);
}


.dataTables_wrapper .dataTables_filter .form-control{
  padding-left: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
}

.svc-filter{ margin:0; }
.svc-filter__row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.svc-filter__group{ display:flex; align-items:center; gap:8px; }
.svc-filter__sep{ color: var(--muted); font-size: 13px; }
.svc-filter__input{ min-height: 40px; padding: 0 10px; }
.svc-filter__btn{ border-radius: var(--radius-sm); box-shadow:none; }


 .svc-timeline{
      display:flex;
      flex-direction:column;
      gap: 12px;
    }

    .svc-timeline__item{
      display:grid;
      grid-template-columns: 190px 1fr;
      gap: 12px;
      align-items: stretch;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      overflow:hidden;
    }

    .svc-timeline__rail{
      position: relative;
      background: var(--surface);
      border-right: 1px solid var(--border);
      padding: 12px 12px 12px 14px;
      overflow: hidden;
    }

    .svc-timeline__rail::before{
      content:"";
      position:absolute;
      left:0;
      top:0;
      bottom:0;
      width:4px;
      background: rgba(37,99,235,.18);
    }

    .svc-timeline__dot{
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: var(--primary);
      box-shadow: 0 0 0 3px rgba(37,99,235,.12);
      margin: 2px 0 10px 0;
    }

    .svc-timeline__date strong{
      display:block;
      color: var(--text);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.2;
    }

    .svc-timeline__date small{
      display:block;
      margin-top: 6px;
      color: var(--muted);
      font-size: 12px;
    }

    .svc-timeline__card{
      background: var(--surface);
      padding: 12px 14px;
    }

    .svc-timeline__title{
      color: var(--text);
      font-weight: bold;
      font-size: 14px;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }

    .svc-timeline__meta{
      display:flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed var(--border);
    }

    .svc-pill{
      display:inline-flex;
      align-items:center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-2);
      background: var(--surface-2);
      color: #374151;
      font-size: 13px;
      text-decoration:none;
      cursor: default;
    }

    .svc-pill .far{ color: var(--muted); }

    .svc-pill strong{
      color: var(--text);
      font-weight: 800;
    }

    .svc-pill--danger{
      cursor: pointer;
      border-color: rgba(220,38,38,.35);
      background: rgba(220,38,38,.08);
      color: #991b1b;
    }
    .svc-pill--danger .far{ color:#b91c1c; }



/* ------------- Login: unify radius + background ------------- */
.login{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login form{
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px 26px;
}

.login .logo{
  text-align: center;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .2px;
  color: var(--text);
  margin-bottom: 10px;
}

.login .logo::after{
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: rgba(46,111,64,.18);
}

.login h1{
  margin: 14px 0 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.login .btn-primary{
  border-radius: var(--radius-sm);
  background: var(--primary);
}
.login .btn-primary:hover{ background: var(--primary-600); }
