/* =============================
   GLOBAL
============================= */

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    background: #a16207;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =============================
   LAYOUT
============================= */

.layout {
    display: flex;
    min-height: 100vh;
}

/* =============================
   SIDEBAR
============================= */

.sidebar {
    width: 230px;
    background: #7c2946;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.sidebar.sidebar-has-custom-bg {
    background-image: var(--sidebar-custom-bg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* LOGO */

/* =============================
   SIDEBAR TOP LOGO (FIXED)
============================= */

.sidebar-logo {
    text-align: center;
    margin-bottom: 5px;
    padding-top: 0;
}

.top-logo {
    width: 200px;      /* Controlled size */
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
/* MENU */

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-bottom: 10px;
}

/* MENU LINKS */

.menu li a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: 0.3s;
}

.menu li a:hover {
    background: rgba(255,255,255,0.2);
}

/* ACTIVE LINK */

.menu li a.active {
    background: rgba(255,255,255,0.9);
    color: #7c2946;
    font-weight: bold;
}

/* FOOTER */

.sidebar .footer {
    margin-top: auto;
    font-size: 12px;
    opacity: 0.8;
}

/* =============================
   MAIN
============================= */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* =============================
   TOPBAR
============================= */

.topbar {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.welcome {
    font-size: 18px;
    font-weight: 500;
}

/* =============================
   TOP PROFILE AVATAR 
============================= */

.profile-icon a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    background: white;
    color: #f59e0b;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* =============================
   CONTENT
============================= */

.content {
    padding: 30px;
    padding-bottom: 1px;
}

/* =============================
   DASHBOARD GRID
============================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, auto);
    gap: 25px;
    align-items: stretch;
}

.dashboard-tile-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* =============================
   CARD DESIGN
============================= */

.card-box {
    min-height: 180px;
    border-radius: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    color: white;
    position: relative;
}

.dashboard-tile-link:hover .card-box,
.dashboard-tile-link:focus-visible .card-box,
.card-box:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 18px 36px rgba(38, 20, 2, 0.22);
}

.dashboard-tile-link:focus-visible {
    outline: none;
}

.dashboard-tile-link:focus-visible .card-box {
    outline: 2px solid rgba(255, 244, 214, 0.95);
    outline-offset: 3px;
}

/* BIG CARD */

.card-box.big {
    grid-column: span 1;
    min-height: 150px;
}

/* TITLE */

.card-box h3,
.card-box h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    margin-top: auto;
    max-width: calc(100% - 110px);
}

/* COUNT */

.count {
    font-size: 80px;
    font-weight: bold;
    margin: 0;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
}

/* =============================
   TOOLBAR FINAL FIX
============================= */

/* Toolbar container */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

/* LEFT SIDE */
.left-tools {
    flex: 1 1 320px;
    min-width: 0;
}

/* SEARCH */
.search-box {
    width: min(450px, 100%);
    max-width: 100%;
    height: 42px;
    border-radius: 10px;
}

/* RIGHT SIDE */
.right-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 420px;
    flex-wrap: wrap;
    min-width: 0;
}

/* FILTER FORM */
.filter-form {
    display: flex;
    flex-direction: row;   /* FORCE HORIZONTAL */
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =============================
   SORT & FILTER (TOOLBAR)
   — Scoped and priority-safe
============================= */


/* ==============================
   FILTER DROPDOWN MENU
============================== */

.filter-container{
    position: relative;
}

/* Filter button */
.filter-btn{
    height:38px;
    padding:0 14px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,0.85);
    cursor:pointer;
    background:#ffffff;
    color:#1f2937;
    font-weight:600;
}

/* Main dropdown */
.filter-dropdown{

    position:absolute;
    top:40px;
    right:0;

    width:200px;

    background:rgba(255,255,255,0.95);
    color:black;

    border-radius:8px;
    box-shadow:0 8px 25px rgba(0,0,0,0.25);

    display:none;
    z-index:1000;

}

/* Show dropdown */
.filter-container:hover .filter-dropdown{
    display:block;
}

/* Item */
.filter-item{

    padding:10px 14px;
    cursor:pointer;
    position:relative;

}

.filter-item:hover{
    background:#f3f3f3;
}

/* Submenu */
.filter-submenu{

    position:absolute;
    top:0;
    left:200px;

    width:200px;

    background:white;

    border-radius:8px;
    box-shadow:0 8px 25px rgba(0,0,0,0.25);

    display:none;

    max-height:250px;
    overflow-y:auto;

}

/* Show submenu */
.filter-item:hover .filter-submenu{
    display:block;
}

/* Submenu links */
.filter-submenu a{

    display:block;
    padding:8px 12px;

    text-decoration:none;
    color:black;

    font-size:13px;

}

/* Hover effect */
.filter-submenu a:hover{
    background:#f59e0b;
    color:white;
}

/* Date filter */
.filter-date{

    padding:10px;
}

.filter-date input{
    width:100%;
    margin-bottom:8px;
}

.filter-apply{

    width:100%;
    padding:6px;
    border:none;

    background:#f59e0b;
    color:white;

    border-radius:6px;
}



/* =============================
   DROPDOWN FIX
============================= */

/* Dropdown main box */
select,
.toolbar-select {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc;
}

/* Dropdown options */
select option {
    background: white;
    color: black;
}

/* Hover effect */
select option:hover {
    background: #f59e0b;
    color: white;
}

/* If you need a different width for filter vs sort, target them separately */
.toolbar-select.filter {
    width: 120px;
}
.toolbar-select.sort {
    width: 80px;
}

/* For option text readability in native selects */
.toolbar-select option {
    color: black;
}

.right-tools > *,
.right-tools form,
.right-tools .filter-container,
.right-tools .toolbar-select,
.right-tools .btn-upload,
.right-tools .btn-add {
    max-width: 100%;
}

/* =============================
   BUTTONS (Add / Upload)
============================= */

.btn-add {
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: white;
    color: rgb(0, 0, 0);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-upload {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* =============================
   TABLE WRAPPER (kept only one)
============================= */

.table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    padding: 15px;
    border-radius: 15px;
    box-sizing: border-box;
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.bulk-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
}

.bulk-actions > * {
    max-width: 100%;
}

.bulk-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.bulk-actions-row-secondary {
    justify-content: flex-start;
    align-items: center;
}

.bulk-selection-count {
    font-weight: 600;
    color: #fff;
    min-width: 130px;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.bulk-selection-actions,
.bulk-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.bulk-selection-actions {
    flex: 1 1 460px;
}

.bulk-assign-group {
    flex: 1 1 430px;
    flex-wrap: nowrap;
}

.bulk-download-group {
    flex: 1 1 340px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.bulk-edit-fields {
    flex: 0 0 auto;
    align-self: center;
}

.bulk-actions select,
.bulk-actions button,
.bulk-actions a {
    max-width: 100%;
}

#assignUser,
#bulkStatusAction {
    flex: 1 1 220px;
    min-width: 0 !important;
}

.bulk-wide-select {
    flex: 1 1 260px !important;
    min-width: 220px !important;
}

.bulk-download-select {
    width: 220px;
    min-width: 220px !important;
    flex: 0 1 220px !important;
}

@media (max-width: 900px) {
    .bulk-assign-group,
    .bulk-download-group {
        flex-wrap: wrap;
    }
}

/* =============================
   TABLE
============================= */

.crm-table {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    width: max-content;   /* ⭐ IMPORTANT */
    border-collapse: collapse;
    color: white;
    min-width: 1600px;
}

.crm-table th,
.crm-table td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header specific style */
.crm-table th {
    font-size: 16px;
    font-weight: 600;
}
.crm-table tr:hover {
    background: rgba(255,255,255,0.1);
}

.profiles-table-wrapper {
    width: calc(100% - 32px);
    max-width: 100%;
    overflow-x: hidden;
}

.profiles-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.profiles-table th,
.profiles-table td {
    padding: 12px 10px;
    max-width: none;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
    vertical-align: top;
}

.profiles-table .profile-row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profiles-table .profile-table-row {
    cursor: pointer;
}

.profiles-table .profile-table-row:hover {
    background: rgba(255,255,255,0.14);
}

.recycle-bin-note {
    color: rgba(255,255,255,0.88);
    font-size: 14px;
}

.recycle-bin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.recycle-bin-actions form {
    margin: 0;
}

.field-manager-sort-note {
    margin: 0 0 14px;
    color: rgba(255,255,255,0.82);
}

.field-manager-table-wrapper {
    overflow-x: visible;
}

.field-manager-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.field-manager-table th,
.field-manager-table td {
    max-width: none;
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.field-manager-table th:nth-child(1),
.field-manager-table td:nth-child(1) {
    width: 80px;
}

.field-manager-table th:nth-child(2),
.field-manager-table td:nth-child(2) {
    width: 40%;
}

.field-manager-table th:nth-child(3),
.field-manager-table td:nth-child(3) {
    width: 14%;
}

.field-manager-table th:nth-child(4),
.field-manager-table td:nth-child(4) {
    width: 14%;
}

.field-manager-table th:nth-child(5),
.field-manager-table td:nth-child(5) {
    width: 18%;
}

.field-manager-table td form {
    max-width: 100%;
}

.field-manager-table .btn-edit,
.field-manager-table .btn-delete {
    white-space: nowrap;
}

.field-drag-handle {
    border: 0;
    background: rgba(255,255,255,0.14);
    color: white;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: grab;
    font-weight: 700;
    letter-spacing: 1px;
}

.field-drag-handle:active {
    cursor: grabbing;
}

.field-drag-placeholder {
    opacity: 0.45;
}

.field-row-draggable {
    transition: background 0.2s ease, transform 0.2s ease;
}

.field-row-draggable.dragging {
    opacity: 0.45;
}

.field-row-draggable.field-row-drag-over td {
    background: rgba(255,255,255,0.16);
}

.profile-modal-content {
    width: 520px;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-modal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-modal-avatar-fallback {
    font-size: 26px;
    font-weight: 700;
}

.profile-modal-note {
    margin: 4px 0 0;
    color: rgba(255,255,255,0.78);
    font-size: 14px;
}

/* =============================
   AVATAR
============================= */

.table-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ddd;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =============================
   BUTTONS
============================= */

.btn-edit {
    background: #6b7280;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 5px;
    color: white;
    font-size: 14px;
}

.btn-delete {
    background: #dc2626;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
}

/* =============================
   GENERAL BUTTONS
============================= */

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    color: white;
}

.btn-primary {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
}

.btn-danger {
    background: #dc2626;
}

/* =============================
   FORMS
   (SCOPED: keep toolbar selects free)
============================= */

/* Apply wide inputs only to typical "form area" containers */
.card input,
.card select,
.modal-content input,
.modal-content select,
.modal-content textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-width: 250px;
    height: 45px;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: white;
    box-sizing: border-box;
}

/* =============================
   STATUS DROPDOWN FIX
============================= */

.status-select {
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;

    background: rgba(255,255,255,0.2);
    color: white;

    border: none;
    cursor: pointer;
}

/* Options visible */
.status-select option {
    background: white;
    color: black;
}

/* Lightweight global defaults: avoid forcing width */
input,
select,
textarea {
    height: 45px;
    font-size: 15px;
    padding: 8px 10px;
    box-sizing: border-box;
}

/* Style native selects where not overridden by .toolbar-select */
select {
    background: rgba(255,255,255,0.08);
    color: white;
    border-radius: 8px;
}

/* =============================
   GENERAL CARD
============================= */

.card {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
}

/* =============================
   PROFILE IMAGE
============================= */

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.avatar-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

/* =============================
   NO DATA
============================= */

.no-data {
    text-align: center;
    padding: 20px;
    color: #ddd;
}

/* =============================
   STATUS
============================= */

.status-badge {
    padding: 6px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    background: #e5e7eb;
    color: #333;
}


/* =============================
   SORT & FILTER BUTTONS (legacy)
   Kept for backward compatibility
============================= */

.btn-light {
    height: 45px;
    padding: 0 20px;
    border-radius: 10px;
    background: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.btn-light:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.btn-light:active {
    transform: scale(0.95);
}

/* =============================
   LOGIN PAGE
============================= */

.login-page {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
    min-width: 60%;
}

.login-right {
    width: 40%;
    min-width: 350px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 320px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(rgba(70, 36, 8, 0.48), rgba(70, 36, 8, 0.62)),
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), transparent 30%),
        radial-gradient(circle at bottom right, rgba(180, 83, 9, 0.35), transparent 35%),
        url("images/lb.webp") center / cover no-repeat fixed,
        linear-gradient(135deg, #92400e 0%, #a16207 45%, #78350f 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    filter: blur(8px);
    pointer-events: none;
}

.auth-page::before {
    top: -80px;
    right: -60px;
}

.auth-page::after {
    left: -80px;
    bottom: -120px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.auth-shell--compact .auth-card {
    max-width: 460px;
}

.auth-card {
    width: min(100%, 780px);
    padding: 34px 32px;
    border-radius: 24px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    color: white;
}

.auth-card--wide {
    max-width: 860px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 14px;
}

.auth-kicker {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: rgba(255,255,255,0.78);
}

.auth-brand h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
}

.auth-subtitle {
    margin: 10px auto 0;
    max-width: 560px;
    color: rgba(255,255,255,0.82);
    font-size: 15px;
}

.auth-messages {
    margin-bottom: 18px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label,
.auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.16);
    color: white;
    box-sizing: border-box;
    outline: none;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.auth-form textarea {
    min-height: 90px;
    resize: vertical;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.auth-form input[type="file"] {
    padding: 10px 12px;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

.auth-switch {
    margin: 18px 0 0;
    text-align: center;
    color: rgba(255,255,255,0.82);
}

.auth-switch a {
    color: #fff4d6;
    font-weight: 600;
}

.auth-page .error {
    color: #fff1f2;
    background: rgba(127, 29, 29, 0.28);
    border: 1px solid rgba(254, 202, 202, 0.22);
    padding: 10px 12px;
    border-radius: 12px;
    margin: 0 0 10px;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 28px 20px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-brand h1 {
        font-size: 28px;
    }
}

/* =============================
   MODAL FIX (CENTER + GLASS)
============================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
}

/* SHOW MODAL */
.modal.show {
    display: flex;
}

/* CONTENT */
.modal-content {
    width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    border-radius: 20px;
    /* GLASS EFFECT */
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    /* ANIMATION */
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

/* ANIMATION ACTIVE */
.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* CLOSE BUTTON */
.modal .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 26px;
    cursor: pointer;
}

/* FORM FIELDS INSIDE MODAL */
.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
}

/* PLACEHOLDERS */
.modal-content input::placeholder,
.modal-content textarea::placeholder {
    color: #eee;
}

/* =============================
   ADD LEAD GLASS UI
============================= */

.form-container {
    padding: 30px;
}

/* Title */
.form-title {
    color: white;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Glass Card */
.glass-card {
    padding: 30px;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px);

    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);

    position: relative;
    z-index: 1;
}

/* Form Layout */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Two Column Layout */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Inputs */
.glass-card input,
.glass-card select {
    width: 100%;
    height: 45px;
    padding: 10px;
    border-radius: 10px;
    border: none;

    background: rgba(255,255,255,0.2);
    color: white;

    outline: none;
    transition: 0.3s;

    position: relative;
    z-index: 2;
}

/* Focus Effect */
.glass-card input:focus {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

/* Placeholder */
.glass-card input::placeholder {
    color: #eee;
}

/* Labels */
.glass-card label {
    font-size: 13px;
    color: #eee;
    display: block;
    margin-bottom: 5px;
}

/* =============================
   DATE & TIME FIX
============================= */

.glass-card input[type="date"],
.glass-card input[type="time"] {
    background: rgba(255,255,255,0.9);
    color: black;
    cursor: pointer;
}

/* Fix calendar icon visibility */
.glass-card input[type="date"]::-webkit-calendar-picker-indicator,
.glass-card input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* =============================
   BUTTON
============================= */

.btn-glass {
    height: 45px;
    padding: 0 25px;
    border-radius: 10px;
    border: none;

    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;

    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

/* Button alignment */
.form-actions {
    margin-top: 10px;
}



/* =============================
   PROFILE GLASS UI
============================= */

.profile-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* Glass Card */
.profile-glass {
    width: 400px;
    padding: 30px;
    border-radius: 20px;
    text-align: center;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);

    color: white;
}

/* Heading */
.profile-heading {
    margin-bottom: 20px;
}

/* Profile Image */
.profile-image {
    margin-bottom: 15px;
}

.avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;

    border: 3px solid rgba(255,255,255,0.4);
}

/* Info */
.profile-info p {
    margin: 8px 0;
    font-size: 15px;
}

/* Actions */
.profile-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-actions .btn-glass {
    min-width: 160px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
}

/* Glass Button */
.btn-glass {
    padding: 10px 20px;
    border-radius: 10px;

    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    text-decoration: none;

    font-weight: 600;
    transition: 0.3s;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

/* Danger Button */
.btn-glass.danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* =============================
   RESPONSIVE
============================= */

@media (max-width: 600px) {
    .profile-glass {
        width: 100%;
    }

    .profile-actions .btn-glass {
        width: 100%;
    }
}

/* =============================
   EDIT PROFILE GLASS UI
============================= */

.edit-profile-page {
    display: flex;
    justify-content: center;
    padding: 30px;
}

/* Card */
.edit-profile-card {
    width: 600px;
    padding: 30px;
    border-radius: 20px;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);

    color: white;
}

/* Title */
.form-title {
    margin-bottom: 20px;
}

/* Form Layout */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Grid Layout */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Inputs */
.edit-profile-card input {
    width: 100%;
    height: 45px;
    padding: 10px;

    border-radius: 10px;
    border: none;

    background: rgba(255,255,255,0.2);
    color: white;

    outline: none;
    transition: 0.3s;
}

/* Focus */
.edit-profile-card input:focus {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

/* Placeholder */
.edit-profile-card input::placeholder {
    color: #eee;
}

/* Labels */
.edit-profile-card label {
    font-size: 13px;
    color: #eee;
    display: block;
    margin-bottom: 5px;
}

/* Photo */
.photo-section {
    text-align: center;
}

.avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;

    border: 3px solid rgba(255,255,255,0.4);
}

/* File input */
.photo-section input[type="file"] {
    background: rgba(255,255,255,0.3);
    padding: 8px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.edit-profile-card .form-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.edit-profile-card .form-actions .btn-glass {
    min-width: 170px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
}

/* Glass Button */
.btn-glass {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;

    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;

    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

/* Secondary Button */
.btn-glass.secondary {
    background: rgba(255,255,255,0.2);
}

/* Error */
.error {
    color: #fecaca;
    background: rgba(239,68,68,0.2);
    padding: 8px;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .edit-profile-card {
        width: 100%;
    }

    .edit-profile-card .form-actions .btn-glass {
        width: 100%;
    }

    .form-group {
        grid-template-columns: 1fr;
    }
}

/* =============================
   ADD PROFILE GLASS UI
============================= */

.add-profile-page {
    display: flex;
    justify-content: center;
    padding: 30px;
}

/* Card */
.add-profile-card {
    width: 600px;
    padding: 30px;
    border-radius: 20px;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);

    color: white;
}

/* Title */
.form-title {
    margin-bottom: 20px;
}

/* Form Layout */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Grid */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Single column */
.form-group.single {
    grid-template-columns: 1fr;
}

/* Inputs */
.add-profile-card input {
    width: 100%;
    height: 45px;
    padding: 10px;

    border-radius: 10px;
    border: none;

    background: rgba(255,255,255,0.2);
    color: white;

    outline: none;
    transition: 0.3s;
}

/* Focus */
.add-profile-card input:focus {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

/* Placeholder */
.add-profile-card input::placeholder {
    color: #eee;
}

/* Label */
.add-profile-card label {
    font-size: 13px;
    color: #eee;
}

/* File input */
.add-profile-card input[type="file"] {
    background: rgba(255,255,255,0.3);
    padding: 8px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Glass Button */
.btn-glass {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;

    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;

    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

/* Secondary */
.btn-glass.secondary {
    background: rgba(255,255,255,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .add-profile-card {
        width: 100%;
    }

    .form-group {
        grid-template-columns: 1fr;
    }
}

/* =============================
   EDIT PROFILE (ADMIN) GLASS UI
============================= */

.edit-profile-page {
    display: flex;
    justify-content: center;
    padding: 30px;
}

/* Card */
.edit-profile-card {
    width: 600px;
    padding: 30px;
    border-radius: 20px;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);

    color: white;
}

/* Title */
.form-title {
    margin-bottom: 20px;
}

/* Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Grid */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Single column */
.form-group.single {
    grid-template-columns: 1fr;
    text-align: center;
}

/* Inputs */
.edit-profile-card input {
    width: 100%;
    height: 45px;
    padding: 10px;

    border-radius: 10px;
    border: none;

    background: rgba(255,255,255,0.2);
    color: white;

    outline: none;
    transition: 0.3s;
}

/* Focus */
.edit-profile-card input:focus {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

/* Placeholder */
.edit-profile-card input::placeholder {
    color: #eee;
}

/* Image */
.avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;

    border: 3px solid rgba(255,255,255,0.4);
}

/* File input */
.edit-profile-card input[type="file"] {
    background: rgba(255,255,255,0.3);
    padding: 8px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Glass Button */
.btn-glass {
    padding: 10px 20px;
    border-radius: 10px;

    background: linear-gradient(135deg, #f2e7ce, #f2e7ce);
    color: #7c2946;

    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

/* Secondary */
.btn-glass.secondary {
    background: rgba(255,255,255,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .edit-profile-card {
        width: 100%;
    }

    .form-group {
        grid-template-columns: 1fr;
    }
}

.sidebar .footer {
    margin-top: auto;
    text-align: center;
    padding-top: 50px;
}

.footer-logo {
    width: 210px;
    height: auto;
    display: block;
    margin: 0 auto 0px auto;
}

.footer-text {
    font-size: 10px;
    opacity: 0.85;
    color: white;
}

body {
    background-image: url("/static/home/images/bg.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ==============================
   GLASS LOGS PAGE
============================== */

.logs-glass-container{

width:95%;
margin:30px auto;
padding:25px;

background: rgba(255,255,255,0.08);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);

border-radius:16px;
border:1px solid rgba(255,255,255,0.2);

box-shadow:0 8px 32px rgba(0,0,0,0.25);

}

/* Title */

.logs-title{

color:white;
margin-bottom:20px;
font-size:22px;
font-weight:600;

}

/* Wrapper */

.logs-table-wrapper{
width:100%;
overflow:hidden;
}

/* Table */

.logs-table{

width:100%;
table-layout:fixed;
border-collapse:collapse;
color:white;

}

/* Header */

.logs-table th{

background: rgba(255,255,255,0.1);
padding:12px;
text-align:left;
font-weight:600;

}

/* Rows */

.logs-table td{

padding:10px;
border-top:1px solid rgba(255,255,255,0.15);
font-size:13px;

}

/* Alternate row */

.logs-table tr:nth-child(even){

background: rgba(255,255,255,0.05);

}

/* ==============================
   LOG HEADER
============================== */

.logs-header{

display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;

}

/* Download button */

.download-btn{

padding:8px 16px;
background: rgba(255,255,255,0.15);
border:1px solid rgba(255,255,255,0.3);
border-radius:8px;
color:white;
text-decoration:none;
font-size:13px;
backdrop-filter: blur(10px);
transition:0.2s;

}

.download-btn:hover{

background: rgba(255,255,255,0.25);

}

/* Description wrap */

.logs-table .desc{

word-break:break-word;
white-space:normal;

}

.download-btn{

padding:8px 16px;
background: rgba(255,255,255,0.15);
border:1px solid rgba(255,255,255,0.3);
border-radius:8px;
color:white;
text-decoration:none;
font-size:13px;
backdrop-filter: blur(10px);
transition:0.2s;

}

.download-btn:hover{

background: rgba(255,255,255,0.25);

}

.crm-table th {
    white-space: nowrap;
}


.crm-table th{
    white-space: nowrap;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.3px;
    text-align: left;
    padding: 14px 18px;
}

/* ==============================
   Tablet & Mobile Enhancements
   Paste this at the end of your CSS
   ============================== */

/* ------------------------------
   Helpful variables for small
   ------------------------------- */
:root{
  --tablet-break: 900px;   /* tablet portrait */
  --tablet-landscape: 1024px; /* larger tablets */
  --mobile-break: 600px;   /* mobile */
  --tiny-mobile: 420px;
}

/* ---------- tablet landscape: slightly tighter ---------- */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }

  .sidebar { width: var(--sidebar-w); }
  .dashboard { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .card-box { min-height: 120px; padding: 16px; }
  .topbar { padding: 0 16px; height: 64px; }
  .crm-table { min-width: 900px; font-size: 0.95rem; }
}

/* ---------- tablet (portrait) ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 180px; }

  .sidebar { width: var(--sidebar-w); }
  .sidebar .footer { padding-top: 28px; }

  /* two-column main -> keep comfortable spacing */
  .dashboard { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* toolbar becomes stacked with compact controls */
  .toolbar { gap: 12px; align-items: stretch; flex-wrap: wrap; }
  .left-tools { width: 100%; order: 1; }
  .right-tools { width: 100%; order: 2; display:flex; justify-content: flex-end; gap:8px; }

  .search-box { max-width: 100%; width: 100%; height:44px; }

  .table-wrapper { padding: 12px; border-radius: 12px; }

  /* table slightly narrower, but still horizontally scrollable */
  .crm-table { min-width: 700px; font-size: 0.95rem; }

  /* modal sizing */
  .modal-content { max-width: 620px; width: 94%; padding: 20px; }

  /* forms: single column where space limited */
  .form-group { grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-group.single { grid-template-columns: 1fr; }
}

/* ---------- mobile: collapse sidebar, stacked table cards ---------- */
@media (max-width: 600px) {
  /* collapse sidebar by default - can be toggled with JS */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-110%);
    width: min(260px, 80%);
    height: 100vh;
    z-index: 1200;
    transition: transform 0.28s ease;
  }
  .sidebar.mobile-open { transform: translateX(0); }

  /* add space for topbar when fixed */
  .topbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 56px;
    padding: 8px 12px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(245,158,11,0.94), rgba(217,119,6,0.94));
  }

  /* ensure main content doesn't sit under topbar */
  .main { padding-top: 66px; }

  /* toolbar stacks */
  .toolbar { flex-direction: column; gap: 10px; align-items: stretch; }

  /* dashboard 1 column */
  .dashboard { grid-template-columns: 1fr; gap: 12px; }

  /* make buttons larger for touch */
  .btn, .btn-glass, .btn-light, .filter-btn { min-height:50px; font-size: 16px; padding-left: 14px; padding-right: 14px; }

  /* Table -> stacked cards.
     Requires you to add data-label attributes on each <td>.
     Example provided below. */
  .crm-table, .crm-table thead, .crm-table tbody, .crm-table th, .crm-table td, .crm-table tr {
    display: block;
  }
  .crm-table thead { position: absolute; left: -9999px; top: -9999px; }
  .crm-table tr {
    margin-bottom: 12px;
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 10px;
  }
  .crm-table td {
    padding: 6px 8px;
    border: none;
    white-space: normal;
    overflow: visible;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
  }
  .crm-table td:before {
    content: attr(data-label);
    flex: 0 0 45%;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 0.95rem;
  }

  /* avatars & images scale down */
  .table-avatar { width: 40px; height: 40px; }
  .avatar-lg { width: 96px; height: 96px; }

  /* modal: full screen feel */
  .modal-content { width: 96%; max-width: 680px; padding: 16px; border-radius: 12px; max-height: 92vh; }

  /* reduce misclick chance */
  input, select, textarea { font-size: 15px; height: 46px; padding: 10px; }

  /* floating add button (optional) */
  .floating-add {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 1300;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 12px;
  }
}

/* ---------- very small phones ---------- */
@media (max-width: 420px) {
  .crm-table td:before { flex-basis: 48%; font-size: 0.88rem; }
  .btn, .btn-glass { font-size: 15px; min-height: 44px; }
  .search-box { height: 44px; font-size: 14px; }
}

/* ---------- Accessibility / touch helpers ---------- */
@media (hover: none) {
  .menu li a:hover { background: rgba(255,255,255,0.08); }
  .btn:hover, .btn-glass:hover { transform: none; }
}

/* ==============================
   MOBILE TOOLBAR
============================== */

.mobile-menu-btn{
    display:none;
    height:40px;
    width:40px;
    border:none;
    border-radius:8px;
    background:rgba(255,255,255,0.2);
    color:white;
    font-size:20px;
    cursor:pointer;
}

/* Tablet */

@media (max-width:900px){

.toolbar{
    flex-wrap:wrap;
}

.left-tools{
    width:100%;
}

.search-box{
    width:100%;
}

}

/* Mobile */

@media (max-width:600px){

.mobile-menu-btn{
    display:block;
}

.toolbar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
}

.left-tools{
    width:100%;
}

.right-tools{
    width:100%;
    flex-wrap:wrap;
    gap:8px;
}

.search-box{
    width:100%;
}

.btn-add{
    width:100%;
    justify-content:center;
}

}

/* MOBILE MENU BUTTON */

.mobile-menu-btn{
    display:none;
    height:40px;
    width:40px;
    border:none;
    border-radius:8px;
    background:rgba(255,255,255,0.2);
    color:white;
    font-size:20px;
    cursor:pointer;
}

/* Tablet */

@media (max-width:900px){

.toolbar{
    flex-wrap:wrap;
}

.left-tools{
    width:100%;
}

.search-box{
    width:100%;
}

}

/* Mobile */

@media (max-width:600px){

.mobile-menu-btn{
    display:block;
}

.toolbar{
    flex-direction:column;
    align-items:stretch;
}

.right-tools{
    flex-wrap:wrap;
    width:100%;
}

.btn-add{
    width:100%;
}

}

/* ==============================
   EDIT PROFILE MOBILE
============================== */

.field{
display:flex;
flex-direction:column;
gap:5px;
}

@media (max-width:768px){

.edit-profile-card{
width:100%;
padding:20px;
}

.form-group{
grid-template-columns:1fr;
}

.photo-section{
text-align:center;
}

.form-actions{
flex-direction:column;
}

.form-actions .btn-glass{
width:100%;
text-align:center;
}

}

/* ==============================
   EDIT PROFILE RESPONSIVE
============================== */

.field{
display:flex;
flex-direction:column;
gap:6px;
}

.photo-section{
text-align:center;
margin-bottom:15px;
}

.photo-section input{
margin-top:10px;
}

.form-actions{
display:flex;
gap:10px;
margin-top:15px;
}

/* Tablet */

@media (max-width:900px){

.edit-profile-card{
width:100%;
}

}

/* Mobile */

@media (max-width:600px){

.form-group{
grid-template-columns:1fr;
}

.edit-profile-card{
padding:20px;
}

.form-actions{
flex-direction:column;
}

.form-actions .btn-glass{
width:100%;
text-align:center;
}

}

/* ==============================
   LOGS HEADER
============================== */

.logs-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
gap:15px;
flex-wrap:wrap;
}

.logs-actions{
display:flex;
gap:10px;
align-items:center;
}

.log-search{
height:40px;
padding:0 12px;
border-radius:8px;
border:none;
min-width:220px;
}

/* ==============================
   MOBILE LOGS TABLE
============================== */

@media (max-width:768px){

.logs-header{
flex-direction:column;
align-items:flex-start;
}

.logs-actions{
width:100%;
flex-direction:column;
align-items:stretch;
gap:8px;
}

.log-search{
width:100%;
}

.download-btn{
width:100%;
text-align:center;
}

/* table -> card layout */

.logs-table thead{
display:none;
}

.logs-table,
.logs-table tbody,
.logs-table tr,
.logs-table td{
display:block;
width:100%;
}

.logs-table tr{
background:rgba(255,255,255,0.08);
margin-bottom:15px;
padding:15px;
border-radius:12px;
}

.logs-table td{
display:flex;
justify-content:space-between;
padding:6px 0;
border:none;
white-space:normal;
}

.logs-table td::before{
content:attr(data-label);
font-weight:600;
color:white;
margin-right:10px;
flex-shrink:0;
}

}

/* ==============================
   MOBILE LOGS TABLE FIX
============================== */

@media (max-width:768px){

.logs-table thead{
display:none;
}

.logs-table,
.logs-table tbody,
.logs-table tr,
.logs-table td{
display:block;
width:100%;
}

.logs-table tr{
background:rgba(255,255,255,0.08);
margin-bottom:15px;
padding:15px;
border-radius:12px;
}

/* Row layout */

.logs-table td{
display:flex;
flex-direction:column;
align-items:flex-start;
padding:8px 0;
border:none;
white-space:normal;
word-break:break-word;
}

/* Label */

.logs-table td::before{
content:attr(data-label);
font-weight:600;
color:white;
margin-bottom:4px;
}

/* Description text wrap */

.logs-table .desc{
white-space:normal;
word-break:break-word;
}

}

/* ==============================
   BULK ACTIONS MOBILE FIX
============================== */

@media (max-width:768px){

.bulk-actions{
flex-direction:column;
align-items:stretch;
gap:10px;
}

.bulk-actions select{
width:100%;
}

.bulk-actions button{
width:100%;
}

.bulk-actions a{
width:100%;
text-align:center;
}

}

/* ==============================
   MOBILE LEADS CARD FIX
============================== */

@media (max-width:600px){

/* allow text to wrap inside cards */

.crm-table td{
max-width:none;
white-space:normal;
overflow:visible;
text-overflow:unset;
}

/* make card spacing better */

.crm-table tr{
padding:16px;
border-radius:14px;
background:rgba(255,255,255,0.08);
margin-bottom:18px;
}

/* better label alignment */

.crm-table td::before{
min-width:120px;
font-weight:600;
}

}

/* ==============================
   MOBILE LEADS FULL CARD VIEW
============================== */

@media (max-width:600px){

/* remove horizontal scroll */

.table-wrapper{
overflow-x: auto;
padding:10px;
}

/* convert table to cards */

.crm-table,
.crm-table thead,
.crm-table tbody,
.crm-table tr,
.crm-table td{
display:block;
width:100%;
}

/* hide header */

.crm-table thead{
display:none;
}

/* card style */

.crm-table tr{
background:rgba(255,255,255,0.12);
border-radius:14px;
padding:16px;
margin-bottom:16px;
box-shadow:0 6px 20px rgba(0,0,0,0.2);
}

/* rows */

.crm-table td{
display:flex;
flex-direction:column;
padding:6px 0;
border:none;

white-space:normal;
overflow:visible;
max-width:none;
}

/* labels */

.crm-table td::before{
content:attr(data-label);
font-weight:600;
margin-bottom:4px;
color:#fff;
font-size:14px;
}

/* values */

.crm-table td{
font-size:14px;
}

}

.glass-card textarea{
width:100%;
min-height:80px;
padding:10px;
border-radius:10px;
border:none;
background:rgba(255,255,255,0.2);
color:white;
resize:vertical;
}

/* ==============================
   ADD LEAD MOBILE FIX
============================== */

@media (max-width:600px){

.form-container{
padding:15px;
}

.glass-card{
width:100%;
padding:20px;
border-radius:16px;
}

/* single column fields */

.form-group{
grid-template-columns:1fr;
}

/* inputs full width */

.glass-card input,
.glass-card select,
.glass-card textarea{
width:100%;
}

/* button full width */

.form-actions{
display:flex;
}

.form-actions button{
width:100%;
}

}
