<style>
/* General Styling */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f7f9fc;
  color: #333333;
}
.settings-emails__block {
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}
.settings-emails__block-title {
  font-weight: 600;
  font-size: 1.2em;
  color: #333333;
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
}
/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 12px;
}
.settings-emails__row {
  border-bottom: 1px solid #e9ecef;
}
.settings-emails__row:hover {
  background-color: #f9fbfd;
}
.settings-emails__row-img img {
  width: 30px;
  height: 30px;
  
}

/* Row Styling */
.settings-emails__row-name {
  font-weight: 600;
  color: #333333;
}
.settings-emails__row-description {
  color: #777777;
  font-size: 0.9em;
}
.settings-emails__row-disable {
  opacity: 0.6;
}
/* Button Styling */
.btn-default {
  background-color: #f0f0f0;
  color: #333333;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85em;
}
.btn-default:hover {
  background-color: #e9ecef;
}
/* Select */
.form-control{
 display: flex;
    align-items: center;
    background-color: #e9ecef; /* Light input background */
    border-radius: 8px;
    padding: 12px;
    color: #333; /* Dark text color */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 50px;
}
   .settings-emails__row-img img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
  }
.theme-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin: 30px;
}

.theme-card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.theme-card:hover {
  transform: scale(1.01);
}

.gradient-bar {
  height: 120px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
}

.theme-angle {
  text-align: center;
  font-weight: 500;
  color: #333;
  margin-bottom: 16px;
  font-size: 1rem;
  opacity: 0.8;
}

.theme-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.color-info {
  font-size: 1rem;
  margin: 6px 0;
  color: #444;
  display: flex;
  align-items: center;
}

.color-info strong {
  width: 80px;
  display: inline-block;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 0 10px;
  border: 1px solid #aaa;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, 0.15);
}
/* Button */
.btn-primary{
    width:100%;
    background: linear-gradient(<?= $pd ?>, <?= $pc_1 ?>, <?= $pc_2 ?>); /* Light gradient */
    color: #ffffff;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease;
}
.btn-primary:hover{
    background: <?= $ph ?>;
    transform: translateY(-2px);
}

</style>
<div class="col-md-8 mx-auto">
  <div class="settings-emails__block">
    
    <div class="settings-emails__block-body">
      <table>
        <thead>
         
        </thead>
        <tbody>
          <tr class="settings-emails__row">
 <td style="width: 60px; vertical-align: top;">
    <lord-icon
  src="https://cdn.lordicon.com/nwfpiryp.json"
    trigger="loop"
    delay="1"
   alt="google" style="width: 50px; height: 50px; float: left; margin:10px 30px;">

</lord-icon>
  </td>  
 <td style="vertical-align: top; padding-left: -40px;">
  <div class="settings-emails__row-name">Admin Panel Color Change</div>
  <div class="settings-emails__row-description">
    Allows administrators to customize the color scheme of the admin panel.
  </div>
</td>

  <td class="settings-emails__td-actions">
    <button type="button" class="btn btn-default btn-xs" 
            data-toggle="modal" 
            data-target="#modalDiv" 
            data-action="color_change"><i class="fas fa-edit"> </i> Edit</button>
  </td>
</tr>

        </tbody>
      </table>
    </div>
  </div>
</div>
<div class="col-md-8 mx-auto">
  <div class="settings-emails__block">
    
    <div class="settings-emails__block-body">
      <table>
        <thead>
         
        </thead>
        <tbody>
     <!-- Theme Preview Box – Clean + Centered Angle -->
<div class="theme-preview">
  <!-- Primary Theme -->
  <div class="theme-card">
    <div class="gradient-bar" style="background: linear-gradient(<?= $pd ?>, <?= $pc_1 ?>, <?= $pc_2 ?>);"></div>
    <div class="theme-angle"><?= $pd ?></div>
    <div class="theme-title">Primary Color Scheme</div>
    <div class="color-info"><strong>Start:</strong> <span class="color-swatch" style="background-color: <?= $pc_1 ?>"></span><?= $pc_1 ?></div>
    <div class="color-info"><strong>End:</strong> <span class="color-swatch" style="background-color: <?= $pc_2 ?>"></span><?= $pc_2 ?></div>
    <div class="color-info"><strong>Hover:</strong> <span class="color-swatch" style="background-color: <?= $ph ?>"></span><?= $ph ?></div>
  </div>

  <!-- Secondary Theme -->
  <div class="theme-card">
    <div class="gradient-bar" style="background: linear-gradient(<?= $sd ?>, <?= $sc_1 ?>, <?= $sc_2 ?>);"></div>
    <div class="theme-angle"><?= $sd ?></div>
    <div class="theme-title">Secondary Color Scheme</div>
    <div class="color-info"><strong>Start:</strong> <span class="color-swatch" style="background-color: <?= $sc_1 ?>"></span><?= $sc_1 ?></div>
    <div class="color-info"><strong>End:</strong> <span class="color-swatch" style="background-color: <?= $sc_2 ?>"></span><?= $sc_2 ?></div>
    <div class="color-info"><strong>Hover:</strong> <span class="color-swatch" style="background-color: <?= $sh ?>"></span><?= $sh ?></div>
  </div>
</div>

        </tbody>
      </table>
    </div>
  </div>
</div>
<script src="https://cdn.lordicon.com/lordicon.js"></script>
<!-- Include necessary JS for modals -->
<script>$(document).ready(function () {
    $("button[data-toggle='modal']").click(function () {
        var action = $(this).data("action");  // Get data-action value
        var modal = $("#modalDiv"); // Target modal
        var modalBody = modal.find(".modal-body"); // Modal content area

        // Reset modal content before loading new data
        modalBody.html('<div class="text-center"><b>Loading...</b></div>');

        // AJAX request to `admin/ajax_data.php`
        $.ajax({
            url: "<?php echo "/$rentaladmin/ajax_data"; ?>",  // Your actual AJAX handler file
            type: "POST",
            data: { action: action },
            success: function (response) {
                modalBody.html(response); // Load the response inside modal
            },
            error: function () {
                modalBody.html('<div class="text-danger text-center"><b>Failed to load data.</b></div>');
            }
        });
    });
});
</script>
