:root {
    --bg-color: #f5f7fa;
    --text-color: #2c3e50;
    --sidebar-bg: #ecf0f1;
    --sidebar-hover: #d0d3d4;
    --navbar-bg: #ffffff;
    --navbar-border: #ddd;
    --content-bg: #ffffff;
    --accent-color: #2980b9;
    --fields: #f5f7fa;
}

.dark-theme {
    --bg-color: #121212;
    --text-color: #ecf0f1;
    --sidebar-bg: #2c2c2c;
    --sidebar-hover: #444;
    --navbar-bg: #1f1f1f;
    --navbar-border: #333;
    --content-bg: #181818;
    --accent-color: #3498db;
    --fields: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
}

.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; 
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar a {
text-decoration: none;
color: var(--text-color);
padding: 0.4rem 0.75rem;
border-radius: 4px;
font-size: 0.95rem;
}

.sidebar a:hover {
    background-color: var(--sidebar-hover);
}

.dropdown {
    margin-bottom: 0.2rem;
}

/* Make the toggle a single clickable row with icon + text */
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
  text-align: left;
  width: 100%;
  border-radius: 4px;
}

.dropdown-toggle:hover { background-color: var(--sidebar-hover); }

.dropdown-element {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-align: left;
  width: 100%;
  border-radius: 4px;
}

.dropdown-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  display: inline-block;
}

.dropdown-label { line-height: 1; }

.dropdown-chevron {
  margin-left: auto;            /* push chevron to the right */
  transition: transform 0.2s ease;
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    margin-left: 0.75rem;
}

.dropdown.open .dropdown-menu {
    display: flex;
}

.theme-toggle {
    margin-top: auto;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 240px;
    transition: margin-left 0.3s;
}

.main.full-width {
    margin-left: 0;
}

.navbar {
    height: 60px;
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar .logo {
    font-weight: bold;
    font-size: 1.2rem;
}

.navbar .user {
    font-size: 0.95rem; 
}

.mobile-menu {
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    display: block;
}

.content {
    padding: 2rem;
    background-color: var(--content-bg);
    flex-grow: 1;
}

.user-modal {
    display: none; 
    position: fixed; 
    inset: 0;  
    background: rgba(255, 255, 255); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center;
    cursor: pointer;
}

.user-overlay {
    width: 100%; 
    height: 100%;
    padding: 40px;
}

.filter {
    display: flex;
    flex-direction: column;
}

.gap-n {
    margin-top: 10px;
}

@media (min-width: 768px) {
    .mobile-menu {
    display: none;
    }

    .sidebar {
    transform: translateX(0) !important;
    }

    .main {
    margin-left: 240px !important;
    }

    .message-input-form {
        left: 240px !important;
    }

    .user-modal {
        left: 240px !important;
    }

    .filter { 
        flex-direction: row; 
        justify-content: space-between;
    }

    .gap-n {
        margin-top: 0;
    }

}

.lbody {
      margin: 0;
      padding: 0;
      background: linear-gradient(to bottom, #000000, #212121);
      font-family: Arial, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .lcard {
      width: 320px;
      text-align: center;
    }

    .ltitle {
      font-size: 2.4rem;
      font-weight: bold;
      color: white;
      margin-bottom: 2rem;
    }

    .lform {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .linput {
      width: 100%;
      padding: 0.8rem;
      border-radius: 0.5rem;
      border: none;
      outline: none;
      background-color: #222222;
      color: white;
      box-sizing: border-box;
      margin-bottom: 1rem;
    }

    .linput::placeholder {
      color: #aaa;
    }

    .lbutton {
      width: 100%;
      padding: 0.8rem;
      background-color: #333333;
      border: none;
      border-radius: 0.5rem;
      color: white;
      font-size: 1rem;
      cursor: pointer;
      transition: background 0.3s ease;
      box-sizing: border-box;
    }

    .lbutton:hover {
      background-color: #555555;
    }


.lback {
    position: fixed;
    top: 10px;
    left: 20px;
    text-decoration: none;
}

.lback-btn {
    color: white;
    background-color: transparent;
    font-size: 26px;
    padding: 10px 10px 10px 10px;
    border: none;
}

    .btn-a {
        color: black;
        background-color: white;
        border: 1px solid black;
    }

a {
    color: var(--accent-color);
}

input {
    color: var(--text-color);
    background: var(--fields);
    border: 1px solid var(--sidebar-hover);
}

textarea {
    color: var(--text-color);
    background: var(--fields);
    border: 1px solid var(--sidebar-hover);
}

.input {
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 25px;
    padding: 2px 2px 2px 8px;
    margin-left: 20px;
}

.input-t {
    margin-left: 0;
    margin-top: 5px;
    border-radius: 25px;
    padding: 8px 15px 8px 15px;
}

.gap {
    margin-top: 10px;
}

.btn-main {
    border-radius: 25px;
    padding: 4px 12px 4px 12px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    border: 1px solid var(--navbar-border);
}

.btn-main:hover {
    box-shadow: 0 0 10px var(--navbar-border);

}

.messages-container {
    height: calc(100vh - 200px);
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-bottom: 2rem;

}

.message-input-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: var(--content-bg);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

table {
    border-collapse: separate;
    border-spacing: 0 5px;
    width: 100%;
    font-family: sans-serif;
    text-align: left;
}

th, td {
    background-color: var(--sidebar-bg);
    padding: 8px 15px 8px 15px;
    border: 1px solid var(--sidebar-hover);
    border-left: none;
    border-right: none;
}

tr th:first-child, tr td:first-child {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    border-left: 1px solid var(--sidebar-hover);
}

tr th:last-child, tr td:last-child {
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    border-right: 1px solid var(--sidebar-hover);
}

tr:hover td {
    background-color: var(--fields);
}

tr.failed-login td {
  background-color: rgb(255, 242, 0) !important;
}

tr.paid-row td {
    background-color: rgb(199, 255, 169) !important;
}

tr.overdue-row td {
    background-color: rgb(255, 175, 175) !important;
}

tr.delayed-row td {
    background-color: rgb(255, 249, 138) !important;
}

.logout {
    display: fixed;
    bottom: 0;
    left: 35px;
}

.red-dot {
    background-color: rgb(240, 36, 36);
    border-radius: 50%;
    width: 7px;
    height: 7px;
}

.notification {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.message {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid var(--sidebar-hover);
    padding: 10px 20px 10px 20px;
    background-color: var(--sidebar-bg);
    margin: 10px;
    border-radius: 25px;
}

.message-text {
    color: var(--text-color);
    text-decoration: none;
}

/* threads */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    resize: none;
    padding-right: 4rem;
}

.textarea-wrapper button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
}

.thread-message {
    display: flex;
    margin: 10px 0;
    clear: both;
}

.thread-message.mine {
    justify-content: flex-end;
}

.thread-message.theirs {
    justify-content: flex-start;
}

.bubble {
    padding: 10px 15px;
    border-radius: 25px;
    max-width: 70%;
    background-color: #f0f0f0;
}

.thread-message.mine .bubble {
    background-color: #aeff00; /* Light radiant green fot me */
    text-align: right;
}

.thread-message.theirs .bubble {
    background-color: #e2e3e5; /* Light grey for others */
    text-align: left;
}

.thread-body {
    max-height: 400px; overflow-y: auto; overflow-x: hidden;
}

.list {
    border: 1px solid var(--sidebar-hover);
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-radius: 25px;
}

/* pagination */
.w-5 {
    width: 16px;
}
.h-5 {
    height: 16px;
}

.task {
    border: 1px solid black;
    border-radius: 25px;
    padding: 20px;
}


/*filter*/
.user-search__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9e3;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: #fff;
}

.user-search__input:focus {
    /*border-color: #7c5cff;*/
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .15);
}

.user-search__results{
    position: absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    z-index:9999;         
    display:none;         
    list-style:none;
    margin:0;
    padding:6px;
    background:#fff;
    border:1px solid #e6e6ef;
    border-radius:12px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    max-height:280px;    
    overflow-y:auto;
}

.user-search__results.is-open{ display:block; }

.user-search__item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px;
    border-radius:10px;
    cursor:pointer;
}

.user-search__item:hover,
.user-search__item:focus-within {
    background: #f6f6fb;
}

.user-search__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-search__name {
    font-weight: 600;
    color: #1f2330;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-search__email {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-search__action {
    margin-left: auto;
    flex: 0 0 auto;
}

.user-search__empty {
    padding: 10px;
    color: #6b7280;
    font-size: 14px;
}


/* IOEN MAIN REDESIGN */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.card {
    position: relative; 
    border: 1px solid #eaeaea; 
    border-radius: 12px; 
    padding: 1rem; 
    display: flex; 
    flex-direction: column; 
    gap: .5rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.card-header {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

.card-title {
    font-weight: 700; 
    font-size: 1.05rem;
}

.card-category {
    font-size: .75rem; 
    padding: .15rem .5rem; 
    border-radius: 999px; 
    background:#f2f2f2; /* COLOR CHANGE */
}

.card-body {
    font-size: .9rem; 
    color:#444;  /* COLOR CHANGE */
}

.card-footer {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    margin-top: .75rem;
}

.card-overlay {
    display: none; 
    position: fixed; 
    inset: 0; 
    background:rgba(0, 0, 0, 0.79); 
    z-index: 1000;
}

.card-modal {
    background:#fff;  /* COLOR CHANGE */
    border-radius: 12px; 
    max-width: 720px; 
    width: 100%; 
    margin: 5vh auto; 
    padding: 1.25rem; 
    position: relative;
}

/* filter toggle dynamic */
.filter-row {
    display: flex; 
    align-items: center; 
    gap: .75rem;
}

.filter-label {
    font-weight: 700; 
    font-size: 1rem; 
    color:#111; /* COLOR CHANGE */
}

/* iOS-like toggle */
.switch {
    position: relative; 
    display: inline-block; 
    width: 49px; 
    height: 25px; 
}

.switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.slider {
    position: absolute; 
    cursor: pointer; 
    inset: 0;
    background:#d1d5db; /* COLOR CHANGE */
    border-radius: 999px;
    transition: background .2s ease;
}

.slider::before {
    content:""; 
    position: absolute; 
    height: 20px; 
    width: 20px; 
    left: 3px; 
    top: 3px;
    background:white; /* COLOR CHANGE */
    border-radius: 50%; 
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.switch input:checked + .slider { background:#111; } /* COLOR CHANGE */
.switch input:checked + .slider::before { transform: translateX(24px); }

