/* =====================================================
   ROOT VARIABLES
===================================================== */
:root {
  --primary: #0a438e;
  --primary-light: #1c5fb8;
  --accent: #e98d00;
  --accent-light: #ffab2e;
  --success: #1f9d6b;
  --danger: #d64545;
  --warning: #d98a00;
  --success-light: #33b07f;
  --danger-light: #eb5a5a;
  --warning-light: #f0a726;
  --neutral: #6b7280;
  --neutral-light: #9ca3af;
  --cancel: #5f6f8a;
  --cancel-light: #7f8da5;
  --bg: #f5f7fb;
  --white: #ffffff;
  --text: #2b2b2b;
  --muted: #6c757d;
  --border: #e3e6ed;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --transition: all 0.25s ease;
  --font: "Segoe UI", Roboto, Arial, sans-serif;
}

/* =====================================================
   GLOBAL RESET
===================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
}

/* =====================================================
   HEADERS
===================================================== */
h1,
h2,
h3,
h4,
h5 {
  color: var(--primary);
  margin-top: 0;
}

h2 {
  border-left: 5px solid var(--accent);
  padding-left: 10px;
}

/* =====================================================
   BUTTONS
===================================================== */
button,
.btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-light);
}
.btn-success {
  background: var(--success);
}
.btn-success:hover {
  background: var(--success-light);
}

.btn-cancel {
  background: var(--cancel);
}
.btn-cancel:hover {
  background: var(--cancel-light);
}

.btn-danger {
  background: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-light);
}
/* =====================================================
   TABLES
===================================================== */
table {
  border-collapse: collapse;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

table th {
  background: var(--primary);
  color: var(--white);
  padding: 10px;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

table tr:hover {
  background: #f1f5ff;
}

/* =====================================================
   FORMS
===================================================== */
input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  transition: var(--transition);
  font-size: 14px;
}
input[type="checkbox"] {
  width: auto;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 67, 142, 0.15);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* Inline editing highlight */
.inline-editing {
  background: #fff9e8;
  border: 1px solid var(--accent);
}

/* =====================================================
   CARDS / CONTAINERS
===================================================== */
.card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* =====================================================
   MODAL
===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--white);
  width: 90%;
  /*max-width: 900px;*/
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.modal-close {
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent);
}

/* =====================================================
   ALERTS / STATUS
===================================================== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  font-size: 14px;
}

.alert-success {
  background: #e6f4ea;
  color: #1e7e34;
}

.alert-error {
  background: #fdecea;
  color: #c82333;
}

/* =====================================================
   BADGES
===================================================== */
.badge {
  background: var(--accent);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
}

/* =====================================================
   SMALL ANIMATIONS
===================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =====================================================
   SCROLLBAR
===================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  table th,
  table td {
    font-size: 13px;
  }

  .modal {
    width: 95%;
    padding: 15px;
  }
}

/* =====================================================
   NAVIGATION
===================================================== */
nav {
  background: var(--primary);
  padding: 0 20px;
  box-shadow: var(--shadow);
}

nav .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav .logo {
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.15);
}

nav ul li a.active {
  background: var(--accent);
}

/* =====================================================
   CUSTOM EDIT MODAL OVERRIDE
===================================================== */
#editModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 40px 15px;
  z-index: 9999;
}

#editModal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

#editModal .modal {
  width: 100%;
  /* max-width: 750px;*/
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
}

/* =====================================================
   ACTION BUTTONS
===================================================== */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  background: var(--primary);
  color: var(--white);
  transition: var(--transition);
}
.btn-size-bigger {
  font-size: 17px;
  padding: 10px 18px;
}

.btn-size-large {
  font-size: 22px;
  padding: 14px 46px;
}

.btn-action:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-action.secondary {
  background: #6c757d;
}

.btn-action.accent {
  background: var(--accent);
  color: #000;
}

/* =====================================================
   GRID SYSTEM
===================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* Base Grid */
.grid {
  display: grid;
  gap: 20px;
}

/* Responsive Columns */
.grid-1 {
  grid-template-columns: repeat(1, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Grid Items */
.grid-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: 0.3s ease;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Optional Card Header */
.grid-item h3 {
  margin-top: 0;
  color: #0a438e;
  border-bottom: 2px solid #e98d00;
  padding-bottom: 6px;
}

/* usage 
<div class="grid grid-2">
    <div>
        <label>Name</label>
        <input type="text">
    </div>

    <div>
        <label>Email</label>
        <input type="email">
    </div>
</div>


or 
<div class="container">

    <div class="grid grid-3">

        <div class="grid-item">
            <h3>Card Title</h3>
            <p>Content goes here.</p>
        </div>

        <div class="grid-item">
            <h3>Another Card</h3>
            <p>More content.</p>
        </div>

        <div class="grid-item">
            <h3>Statistics</h3>
            <p>Some data here.</p>
        </div>

    </div>

</div>

*/
.grid-auto {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
/* usage 
<div class="grid-auto">
    <div class="grid-item">Item</div>
    <div class="grid-item">Item</div>
    <div class="grid-item">Item</div>
</div>
*/
.hidden {
  display: none;
}

#addKeyPhraseForm {
  width: 100%;
  height: 100%;
  z-index: 9999999999999;
  background-color: #fffff0ee;
  padding: 30px 70px;
  box-sizing: border-box;
}

/* table sort  */
th.enable-sort {
  cursor: pointer;
  position: relative;
  padding-right: 18px;
}

th.enable-sort::after {
  content: "⇅";
  font-size: 12px;
  position: absolute;
  right: 5px;
  opacity: 0.5;
}

th.enable-sort.sort-asc::after {
  content: "▲";
  opacity: 1;
}

th.enable-sort.sort-desc::after {
  content: "▼";
  opacity: 1;
}

.m-top {
  margin-top: 10px;
}

.page-content {
  padding: 5px 15px;
}
.title-inside-td {
  font-weight: bold;
  display: inline-block;
  width: 220px;
}
.keyphrase-edit-td select {
  width: 70%;
  width: calc(100% - 220px);
}

/* multiselect */

.multi-select-wrapper {
  position: relative;

  display: flex;
}

.multi-select-wrapper input[type="text"] {
  width: 100%;
  margin-bottom: 5px;
}

.multi-select-dropdown {
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border-radius: 6px;
}

.multi-option {
  display: block;
  padding: 4px;
  cursor: pointer;
}

.multi-option:hover {
  background: #f5f5f5;
}

.selected-tags {
  margin-top: 8px;
}

.tag {
  display: inline-block;
  background: #0a438e;
  color: #fff;
  padding: 4px 8px;
  margin: 3px;
  border-radius: 20px;
  font-size: 12px;
}

.multi-select-wrapper .select-input-section {
  width: 400px;
}
.multi-select-wrapper .selectd-tag-section {
  width: calc(100% - 400px);
  max-width: 600px;
}

.report-table td,
.report-table th {
  border: 1px solid var(--neutral-light);
}
