/* Dark Mode & Mobile Responsive Styles */

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a; /* Dark background */
    color: #f0f0f0; /* Light text */
    line-height: 1.6;
    margin: 0;
    padding-top: 70px; /* Space for fixed navbar */
    display: flex; /* Add flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

.container {
    background-color: #2a2a2a; /* Slightly lighter dark for containers */
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Pronounced dark shadow */
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Headings */
h2 {
    color: #e0e0e0; /* Lighter heading color */
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 2rem;
    text-align: center;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #d0d0d0;
    margin-bottom: 7px;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #444; /* Darker border */
    background-color: #3a3a3a; /* Dark background for inputs */
    color: #f0f0f0; /* Light text in inputs */
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #00bcd4; /* Cyan focus */
    box-shadow: 0 0 0 0.2rem rgba(0, 188, 212, 0.25); /* Cyan glow */
    background-color: #3a3a3a; /* Maintain dark background on focus */
    color: #f0f0f0;
}

/* General Button Styles */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-s {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-primary {
    color: #fff;
    background-color: #00bcd4; /* Cyan */
    border-color: #00bcd4;
}
.btn-primary:hover {
    background-color: #0097a7;
    border-color: #0097a7;
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

.btn-secondary {
    color: #fff;
    background-color: #607d8b; /* Blue Grey */
    border-color: #607d8b;
}
.btn-secondary:hover {
    background-color: #455a64;
    border-color: #455a64;
    box-shadow: 0 4px 10px rgba(96, 125, 139, 0.3);
}

.btn-success {
    color: #fff;
    background-color: #4caf50; /* Green */
    border-color: #4caf50;
}
.btn-success:hover {
    background-color: #388e3c;
    border-color: #388e3c;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-danger {
    color: #fff;
    background-color: #f44336; /* Red */
    border-color: #f44336;
}
.btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.3);
}

.btn-info {
    color: #fff;
    background-color: #2196f3; /* Blue */
    border-color: #2196f3;
}
.btn-info:hover {
    background-color: #1976d2;
    border-color: #1976d2;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

/* Table Styles - Clean Dark Mode and Responsive */
.table {
    width: 100%;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
    border-collapse: collapse; /* Use collapse for clean lines */
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden; /* For rounded corners on tables */
}

.table thead th {
    padding: 15px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #444; /* Darker border for header */
    background-color: #3a3a3a; /* Darker background for header */
    color: #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-align: left;
}

.table tbody tr {
    transition: background-color 0.2s ease;
    background-color: #2a2a2a; /* Dark background for rows */
    border-bottom: 1px solid #3a3a3a; /* Subtle separator between rows */
}

.table tbody tr:last-child {
    border-bottom: none; /* No border for the last row */
}

.table tbody tr:hover {
    background-color: #3a3a3a; /* Lighter dark on hover */
}

.table td {
    padding: 12px 20px;
    vertical-align: middle;
    border-top: none;
    font-size: 0.95rem;
}

/* Responsive Table Specific Styles (Mobile) */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    .container,
    .login-container {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Table specific responsive adjustments */
    .table thead {
        display: none; /* Hide headers on mobile */
    }

    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 15px;
        border: 1px solid #444;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        background-color: #2a2a2a; /* Ensure card background is consistent */
        padding: 10px 0; /* Adjust padding for card layout */
    }
    
    .table tbody tr:hover {
        background-color: #3a3a3a; /* Lighter dark on hover for mobile cards */
    }

    .table td {
        text-align: right;
        padding-left: 50%; /* Space for data-label */
        position: relative;
        border: none;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 48%; /* Adjust width to prevent overlap */
        padding-left: 15px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #bbbbbb; /* Slightly lighter label color */
    }
}

/* Navbar Styling */
.navbar {
    background-color: #2a2a2a !important; /* Darker navbar */
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    padding-top: 10px;
    padding-bottom: 10px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: #00bcd4 !important; /* Cyan brand text */
    transition: color 0.2s ease;
}
.navbar-brand:hover {
    color: #00e5ff !important; /* Lighter cyan on hover */
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #e0e0e0; /* Light link text */
    margin-left: 8px;
    margin-right: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(0, 188, 212, 0.1); /* Subtle cyan hover background */
    color: #00bcd4;
}

.navbar-nav .nav-link.active {
    background-color: rgba(0, 188, 212, 0.2); /* More prominent active background */
    color: #00bcd4;
}

.btn-outline-light {
    border-color: #00bcd4;
    color: #00bcd4;
}

.btn-outline-light:hover {
    background-color: #00bcd4;
    color: #2a2a2a;
}

/* Login Page Specific Styles */
.login-container {
    max-width: 480px;
    padding: 50px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.login-container h2 {
    text-align: center;
    color: #e0e0e0;
}

/* Status Indicators */
.status-indicator {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active .status-dot {
    background-color: #4caf50; /* Green for active */
}

.status-active {
    color: #4caf50;
}

.status-inactive .status-dot {
    background-color: #607d8b; /* Blue Grey for inactive */
}

.status-inactive {
    color: #607d8b;
}

/* Icon Styling */
.icon-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon {
    font-size: 1.2rem;
    color: #e0e0e0; /* Light color for icons */
    cursor: pointer;
    transition: color 0.2s ease;
}

.icon:hover {
    color: #00bcd4; /* Cyan hover effect */
}

.icon-cp {
    color: #ff9800; /* Orange color for cPanel icon */
}

.icon-chevron-down {
    font-size: 1.1rem;
    color: #bbbbbb;
}

/* Modal Styling for Dark Mode */
.modal-content {
    background-color: #2a2a2a; /* Dark background for modal content */
    color: #f0f0f0; /* Light text */
    border: 1px solid #444; /* Subtle border */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Stronger shadow for dark mode */
}

.modal-header {
    border-bottom: 1px solid #3a3a3a; /* Darker separator */
    background-color: #3a3a3a; /* Slightly darker header */
    color: #e0e0e0; /* Light heading text */
}

.modal-title {
    color: #e0e0e0;
}

.modal-body {
    color: #f0f0f0;
}

.modal-footer {
    border-top: 1px solid #3a3a3a; /* Darker separator */
    background-color: #3a3a3a; /* Slightly darker footer */
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Make close button visible on dark background */
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem; /* Adjust modal margin on small screens */
    }

    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.1); /* Light border for toggler */
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar-collapse {
        background-color: #2a2a2a; /* Ensure collapsed menu has a background */
        padding: 10px 0;
    }

    .navbar-nav {
        text-align: center; /* Center links in mobile menu */
    }
    .navbar-nav .nav-item {
        margin-bottom: 5px; /* Space between links */
    }
    .navbar-nav .nav-link {
        width: 100%; /* Full width links */
        margin: 0; /* Remove horizontal margin */
    }

    /* Adjust .btn-sm inside navbar for mobile */
    .navbar-nav .nav-link.btn-sm {
        padding: 0.2rem 0.4rem; /* Match .btn-s padding */
        font-size: 0.75rem; /* Match .btn-s font size */
    }


}

/* Custom Checkbox Style */
.checkbox-wrapper-26 * {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.checkbox-wrapper-26 input[type="checkbox"] {
  display: none;
}

.checkbox-wrapper-26 label {
  --size: 25px; /* Adjusted size for better fit in tables */
  --shadow: calc(var(--size) * .07) calc(var(--size) * .1);

  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  margin: 0 auto;
  background-color: #f44336; /* Danger Red */
  border-radius: 50%;
  box-shadow: 0 var(--shadow) #ffbeb8;
  cursor: pointer;
  transition: 0.2s ease transform, 0.2s ease background-color,
    0.2s ease box-shadow;
  overflow: hidden;
  z-index: 1;
}

.checkbox-wrapper-26 label:before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  width: calc(var(--size) * .7);
  height: calc(var(--size) * .7);
  margin: 0 auto;
  background-color: #fff;
  transform: translateY(-50%);
  border-radius: 50%;
  box-shadow: inset 0 var(--shadow) #ffbeb8;
  transition: 0.2s ease width, 0.2s ease height;
}

.checkbox-wrapper-26 label:hover:before {
  width: calc(var(--size) * .55);
  height: calc(var(--size) * .55);
  box-shadow: inset 0 var(--shadow) #ff9d96;
}

.checkbox-wrapper-26 label:active {
  transform: scale(0.9);
}

.checkbox-wrapper-26 .tick_mark {
  position: absolute;
  top: -1px;
  right: 0;
  left: calc(var(--size) * -.05);
  width: calc(var(--size) * .6);
  height: calc(var(--size) * .6);
  margin: 0 auto;
  margin-left: calc(var(--size) * .14);
  transform: rotateZ(-40deg);
}

.checkbox-wrapper-26 .tick_mark:before,
.checkbox-wrapper-26 .tick_mark:after {
  content: "";
  position: absolute;
  background-color: #fff;
  border-radius: 2px;
  opacity: 0;
  transition: 0.2s ease transform, 0.2s ease opacity;
}

.checkbox-wrapper-26 .tick_mark:before {
  left: 0;
  bottom: 0;
  width: calc(var(--size) * .1);
  height: calc(var(--size) * .3);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.23);
  transform: translateY(calc(var(--size) * -.68));
}

.checkbox-wrapper-26 .tick_mark:after {
  left: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--size) * .1);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.23);
  transform: translateX(calc(var(--size) * .78));
}

.checkbox-wrapper-26 input[type="checkbox"]:checked + label {
  background-color: #4caf50; /* Success Green */
  box-shadow: 0 var(--shadow) #92ff97;
}

.checkbox-wrapper-26 input[type="checkbox"]:checked + label:before {
  width: 0;
  height: 0;
}

.checkbox-wrapper-26 input[type="checkbox"]:checked + label .tick_mark:before,
.checkbox-wrapper-26 input[type="checkbox"]:checked + label .tick_mark:after {
  transform: translate(0);
  opacity: 1;
}

/* İhtiyaç Seçim Modalı Kart Stilleri */
.ihtiyac-card {
    border: 2px solid #555; /* Varsayılan koyu renk çerçeve */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #3a3a3a; /* Kart arka planı */
    color: #f0f0f0; /* Kart yazısı rengi */
}

.ihtiyac-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.ihtiyac-card.selected-card {
    border-color: #dc3545; /* Kırmızı çerçeve */
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); /* Hafif kırmızı gölge */
}

.ihtiyac-card .card-img-top {
    width: 40px; /* Daha ufak resimler */
    height: 40px;
    object-fit: contain;
}

.ihtiyac-card { position: relative; }
.delete-ihtiyac-card-btn {
    position: absolute;
    top: 5px; /* Üstten biraz daha içeride */
    right: 5px; /* Sağdan biraz daha içeride */
    background-color: #dc3545; /* Kırmızı */
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px; /* Boyut küçültüldü */
    height: 22px; /* Boyut küçültüldü */
    font-size: 13px; /* Yazı tipi boyutu küçültüldü */
    line-height: 1; /* Metin dikey hizalaması */
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}
.delete-ihtiyac-card-btn:hover { 
    background-color: #c82333; 
    transform: scale(1.1); /* Hover'da hafif büyüme */
}

.ihtiyac-date {
    background-color: #000; /* Siyah arka plan */
    color: #fff; /* Beyaz yazı */
    padding: 3px 8px;
    border-radius: 5px; /* Köşeleri yuvarla */
    font-size: 0.8rem;
    display: inline-block; /* Genişliği içeriğine göre ayarla */
    margin-top: 5px;
}