


.sidebar {
    width: 60px;
    height: auto;
    min-height: 100vh;
    background-color: #2c3e50;
    color: white;
    overflow-x: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-top: 20px;
    transition: width 0.3s ease;
    box-shadow: 2px 0 6px rgba(0,0,0,0.15);
}
.sidebar.expanded { width: 230px; }

.sidebar ul {
    list-style: none;
    padding: 70px 10px 10px;
    margin: 0;
    display: none;
}
.sidebar.expanded ul { display: block; }

.sidebar li { margin-bottom: 16px; }

.menu-link {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.25s ease, padding-left 0.25s ease;
}
.sidebar-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: -4px;
    filter: brightness(0) invert(1);
}
.menu-link:hover {
    background-color: #34495e;
    padding-left: 18px;
}
.menu-link.active {
    background-color: #1abc9c;
    font-weight: 600;
}

#toggleSidebar {
    position: absolute;
    top: 10px;
    left: 12px;
    background: transparent;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 2;
}




html, body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    position: relative;
}

.main-content {
    margin-left: 0;
    padding: 25px 35px;
    min-height: 100vh;
    background: #f5f7f3;
    transition: margin-left 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}
.main-content.with-sidebar {
    margin-left: 0;
    width: 100%;
}

.sidebar ~ .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

.sidebar.expanded ~ .main-content {
    margin-left: 230px;
    width: calc(100% - 230px);
}




.header {
    background: #333;
    color: #fff;
    padding: 25px 35px;
    text-align: center;
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
}
.header-content {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    overflow: visible;
    gap: 16px;
}
.header-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 1;
    margin-left: -15px;
}
.header-logo {
    height: 100px;
    width: 100px;
    display: block;
    margin-top: 20px;
}


.index-logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 100px;
    width: 100px;
    margin-left: 25px;
}
@media (max-width: 600px) {
    .index-logo {
        height: 80px;
        width: 80px;
        margin-left: 25px;
    }
}
.header-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    position: static;
    text-align: center;
    grid-column: 2;
    justify-self: center;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.user-info-line {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #c9e0c1;
}
.notifications {
    position: relative;
    grid-column: 3;
    justify-self: end;
}
.notif-button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    position: relative;
}
.notif-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 13px;
}
.notif-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 30px;
    background: white;
    color: black;
    border: 1px solid #ccc;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 6px;
    max-width: min(300px, calc(100vw - 32px));
}
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { padding: 10px; border-bottom: 1px solid #eee; }
.notif-item.unread { background: #e6f7ff; font-weight: 600; }
.notif-item.read { background: #f9f9f9; font-weight: normal; }
.notif-link { text-decoration: none; color: #000; display: block; }
.notif-link:hover { background: #d0ebff; }
.notif-form { text-align: center; margin: 10px 0; }
.mark-read-btn {
    background: #6a994e;
    color: white;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 5px;
}
.notif-empty { padding: 10px; text-align: center; }

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 0;
    position: relative;
    z-index: 1100;
}




.slider-container {
    max-width: 100%;
    position: relative;
    margin-bottom: 30px;
}
.slide { display: none; text-align: center; }
.slide img {
    width: 100%;
    height: 35vh;
    object-fit: cover;
}
.slide-caption {
    position: absolute;
    bottom: 16%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 22px;
    border-radius: 6px;
}




#yearButtons {
    text-align: center;
    margin-bottom: 25px;
}
#yearButtons button {
    background: #6a994e;
    color: white;
    border: none;
    padding: 8px 14px;
    margin: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}
#yearButtons button:hover {
    background-color: #4a7c31;
    transform: translateY(-2px);
}

#yearButtons .btn.active,
#yearButtons button.active,
#yearButtons .btn.btn-secondary.active {
    background-color: #4a7c31 !important;
    color: #fff !important;
    border-color: #4a7c31 !important;
}




.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #333;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
.card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}
.card h3 {
    margin: 6px 0 12px;
    font-size: 18px;
    color: #333;
}

.card.card-dashboard {
    height: 420px;
    padding: 14px;
    overflow: hidden;
}
.card.card-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.card.card-industry {
    height: 440px;
    padding: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card.card-industry:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}





.table-uniform {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #ffffff;
}

.table-uniform th,
.table-uniform td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

.table-select {
    font-size: 14px;
    color: #333;
    padding: 4px 8px;
    height: 32px;
    line-height: 1.2;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.table-uniform th {
    background: #2c3e50;
    color: #fff;
}

.table-uniform tbody tr:nth-child(even) {
    background: #f9fafb;
}

.table-uniform tbody tr:hover {
    background: #eef3ff;
}





.contract-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.contract-table th,
.contract-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}
.contract-table th {
    background: #2c3e50;
    color: #fff;
    width: 180px;
    font-weight: 600;
}




.progress-bar {
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    height: 54px;
}
.progress-fill {
    height: 100%;
    background: #28a745;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    line-height: 54px;
}




.cutoff-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}




input[type="text"],
input[type="number"],
input[type="file"],
input[type="date"],
input[type="month"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
}
input:focus,
textarea:focus,
select:focus {
    border-color: #6a994e;
    box-shadow: 0 0 4px rgba(106,153,78,0.5);
    outline: none;
}




.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid transparent;
    font-size: 14px;
}
.alert-success {
    background: #e8f4e1;
    border-color: #b9dfb0;
    color: #2f6b1c;
}
.alert-danger {
    background: #f8d7da;
    border-color: #f1b5bb;
    color: #842029;
}
.alert-warning {
    background: #fff3cd;
    border-color: #ffe69c;
    color: #856404;
}




button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 42px;
    padding: 0 16px;

    border-radius: 6px;
    border: none;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;

    background: #6a994e;
    color: #fff;

    transition: background 0.25s ease, transform 0.2s ease;
}

button:hover,
.btn:hover {
    background: #4a7c31;
    transform: translateY(-2px);
}

.btn-primary {
    background: #6a994e;
    color: #fff;
}
.btn-primary:hover {
    background: #4a7c31;
}

.btn-secondary {
    background: #7f8c8d;
    color: #fff;
}
.btn-secondary:hover {
    background: #636e72;
}
button.btn-edit,
a.btn-edit {
    background: #4a6fa5;
    color: #fff;
}

button.btn-edit:hover,
a.btn-edit:hover {
    background: #3b5d8a;
}


.btn-danger {
    background: #c0392b;
    color: #fff;
}
.btn-danger:hover {
    background: #a83227;
}



.btn-outline-danger {
    background: transparent;
    color: #c0392b;
    border: 2px solid #c0392b;
}
.btn-outline-danger:hover {
    background: #c0392b;
    color: #fff;
}

.btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
}





@media (max-width: 992px) {
    .header {
        padding: 18px 20px;
    }

    .header-content {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        align-items: center;
    }

    .header-left {
        position: static;
        transform: none;
        margin-left: 0;
        justify-content: flex-start;
    }

    .header-logo {
        width: 72px;
        height: 72px;
        margin-top: 0;
    }

    .header-title {
        font-size: 20px;
        text-align: left;
        justify-self: stretch;
    }

    .notif-dropdown {
        right: 0;
        left: auto;
    }

    .sidebar ul {
        padding: 70px 10px 10px;
    }

    .sidebar li {
        margin-bottom: 10px;
    }

    #toggleSidebar {
        position: absolute;
        top: 10px;
        left: 12px;
        width: auto;
        padding: 0;
        border-radius: 0;
        font-size: 26px;
        background: transparent;
    }

    .main-content,
    .main-content.compact {
        padding: 20px;
    }

    .table-scroll > table {
        min-width: 640px;
    }

    .table-scroll > .table-uniform,
    .table-scroll > .outstanding-table,
    .table-scroll > .contract-table,
    .table-scroll > .task-table,
    .table-scroll > .activity-table {
        min-width: 640px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 16px;
    }

    .header-content {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo notif"
            "title title";
        align-items: center;
    }

    .header-left {
        grid-area: logo;
    }

    .notifications {
        grid-area: notif;
        justify-self: end;
    }

    .header-title {
        grid-area: title;
        text-align: center;
        font-size: 18px;
        margin-top: 6px;
    }

    .header-logo {
        width: 58px;
        height: 58px;
    }

    .user-info-line {
        font-size: 13px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .notif-dropdown {
        position: fixed;
        top: auto;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        max-height: min(60vh, 420px);
    }

    .main-content,
    .main-content.compact {
        padding: 16px;
    }

    .card {
        padding: 14px;
    }

    .form-card {
        margin: 20px auto;
        padding: 18px;
    }

    .form-card .actions,
    .reply-actions,
    .toggle-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    button {
        white-space: normal;
    }

    .table-scroll > table {
        min-width: 560px;
    }

    .table-scroll > .table-uniform,
    .table-scroll > .outstanding-table,
    .table-scroll > .contract-table,
    .table-scroll > .task-table,
    .table-scroll > .activity-table {
        min-width: 560px;
    }
}



.last-used-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}


.last-used-pill.safe {
  background: #ecfdf5;
  color: #065f46;
}


.last-used-pill.moderate {
  background: #fffbeb;
  color: #92400e;
}


.last-used-pill.caution {
  background: #fff7ed;
  color: #9a3412;
}


.last-used-pill.recent {
  background: #fef2f2;
  color: #991b1b;
}


.last-used-pill.never {
  background: #f3f4f6;
  color: #374151;
}






.auth-base {
    background: #f4f6f9;
    margin: 0;
    padding: 0;
}


.auth-vr .container {
    max-width: 450px;
    margin: 60px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.auth-vr h2 {
    text-align: center;
    margin-bottom: 20px;
}
.auth-vr label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}
.auth-vr button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}
.auth-vr button:hover { background: #0056b3; }


.legacy-alerts .alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}
.legacy-alerts .alert-success { background-color: #d4edda; color: #155724; }
.legacy-alerts .alert-warning { background-color: #fff3cd; color: #856404; }
.legacy-alerts .alert-danger  { background-color: #f8d7da; color: #721c24; }
.legacy-alerts .alert-info    { background-color: #cce5ff; color: #004085; }


.buyer-portal {
    background: #f5f7fa;
    margin: 0;
    padding: 0;
}


.offer-page { background: #f8f8f8; }


.main-content.compact { padding: 20px; }


.type-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-block;
}
.type-split-a { background: #e6f4ea; color: #2e7d32; border: 1px solid #81c784; }
.type-split-b { background: #e3f2fd; color: #0d47a1; border: 1px solid #64b5f6; }
.type-mixed { background: #fff8e1; color: #8d6e63; border: 1px solid #ffcc80; }
.type-standard { background: #f1f1f1; color: #444; border: 1px solid #ccc; }
.type-badge.status-open { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.type-badge.status-complete { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }


.cutoff-inline {
    background: #eef7ff;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #084298;
    font-weight: 600;
}
.cutoff-inline[data-vessel-status="loaded"],
.cutoff-inline[data-vessel-status="sailed"] {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    color: inherit !important;
}
.cutoff-inline.urgent  { background: #ffe6e6; border: 1px solid #ffb3b3; color: #a10000; }
.cutoff-inline.warning { background: #fff5e6; border: 1px solid #ffcc80; color: #b86e00; }
.cutoff-inline.overdue {
    background: #ffe6e6;
    border: 1px solid #ffb3b3;
    color: #a10000;
}


.outstanding-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.outstanding-table th,
.outstanding-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 14px;
    text-align: left;
}
.outstanding-table th { background: #2c3e50; color: #fff; }
.outstanding-table tr:nth-child(even) { background: #f9fafb; }
.outstanding-table tr:hover { background: #eef3ff; }


.contract-number-badge {
    display:inline-block;
    background:#eef3ff;
    color:#1f3c88;
    border:1px solid #1f3c88;
    padding:6px 14px;
    border-radius:8px;
    font-weight:600;
    letter-spacing:0.5px;
    font-size:14px;
}
.contract-table tr:hover { background: #eef3ff; }

.table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-scroll > table,
.table-scroll > .table-uniform,
.table-scroll > .outstanding-table,
.table-scroll > .contract-table,
.table-scroll > .task-table,
.table-scroll > .activity-table {
    width: max-content;
    min-width: 100%;
}

.table-scroll > table {
    min-width: 720px;
}


.contract-info { font-size: 14px; color: #444; margin-top: 6px; line-height: 1.4; }
.msg { color: #333; font-weight: 600; }
.muted { font-size: 14px; color: #666; }
.pill { display: inline-block; padding: 2px 8px; font-size: 13px; border-radius: 999px; background: #eef6ec; color: #375a2b; margin-left: 8px; }
.progress-title { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.tile-link { text-decoration: none; color: inherit; display: block; }




.container {
    width: 100%;
    max-width: none;
    margin: 20px 0;
    padding: 0;
}


.auth-base .container {
    max-width: 450px;
    margin: 60px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.auth-base h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}
.auth-base label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
    color: #555;
}
.auth-base input {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}
.auth-base .message {
    margin-bottom: 15px;
    text-align: center;
}




.tile {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 12px 14px;
    margin-bottom: 12px;
    transition: 0.25s ease;
    font-size: 14px;
}
.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
    background: #fdfdfd;
}




.card-mini {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}
.q-status-badge { padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; }


.form-card {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.form-card h2 { margin-top:0; }
.form-group { margin-bottom:14px; }
.form-card label { font-weight:600; font-size:14px; display:block; margin-bottom:4px; }
.form-card .actions { display:flex; justify-content:space-between; margin-top:20px; }
.form-card .error { color:#b00020; font-size:14px; margin-bottom:10px; }


.field-inputs input {
    width:100%;
    padding:8px;
    border-radius:6px;
    border:1px solid #ccc;
    font-size:14px;
}


.form-row input,
.form-row select {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}


.attachments { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.attachment {
    position:relative;
    width:54px;
    height:54px;
    border:1px solid #ccc;
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
}
.attachment img { max-width:100%; max-height:100%; cursor:pointer; }
.attachment .file { font-size:22px; cursor:pointer; }
.attachment a.download {
    position:absolute;
    bottom:2px;
    right:2px;
    font-size:14px;
    background:#fff;
    border-radius:999px;
    padding:2px 6px;
    text-decoration:none;
    border:1px solid #ddd;
}
.msg p { margin:0; font-size:14px; }
.msg strong { font-size:14px; display:block; margin-bottom:4px; }
.reply-actions { display:flex; align-items:center; gap:12px; margin-top:10px; }
.reply-actions .spacer { flex:1; }
.thread-row { display:none; background:#f9fafb; }
.thread-row td { padding:16px 24px 16px 16px; }
#newMessageBox textarea,
.thread-row textarea { width:100%; min-height:90px; box-sizing:border-box; }


.chat-box {
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.chat-box .msg {
    max-width: 70%;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    word-wrap: break-word;
}
.chat-box .msg-left {
    align-self: flex-start;
    text-align: left;
    background: #f1f5f9;
    border-top-left-radius: 4px;
}
.chat-box .msg-right {
    align-self: flex-end;
    text-align: left;
    background: #e8f5e9;
    border-top-right-radius: 4px;
}
#newMessageBox form,
#newMessageBox input,
#newMessageBox textarea {
    width: 100%;
    box-sizing: border-box;
}
.has-new-message { background-color: #fff7ed; }
@keyframes pulseGlow {
    0%   { box-shadow: 0 0 0 rgba(251,146,60,0.0); }
    50%  { box-shadow: 0 0 12px rgba(251,146,60,0.55); }
    100% { box-shadow: 0 0 0 rgba(251,146,60,0.0); }
}
.pulse-once { animation: pulseGlow 2s ease-out; }


.topbar { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px }





.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    row-gap: 10px;
    background: #f7f7f7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.filters .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filters label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.filters input,
.filters select {
    height: 42px;
    min-width: 200px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
}

.filters input:focus,
.filters select:focus {
    border-color: #6a994e;
    box-shadow: 0 0 0 3px rgba(106,153,78,0.25);
    outline: none;
}

.filters .actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 2px;
}

.search-bar,
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 8px;
}

.search-bar input,
.search-form input {
    height: 42px;
    min-width: 240px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.search-bar button,
.search-form button {
    height: 42px;
    padding: 0 14px;
    border-radius: 6px;
    border: none;
    background: #6a994e;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-bar button:hover,
.search-form button:hover {
    background: #4a7c31;
    transform: translateY(-1px);
}

.search-bar.center { justify-content: center; }


.filters .btn-reset {
    height: 42px;
    padding: 0 16px;
    background: #7f8c8d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.filters .btn-reset:hover { background: #707b7c; }




.ui-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ui-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ui-row-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ui-row-between-start {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.ui-gap-sm { gap: 6px; }
.ui-gap-lg { gap: 12px; }
.ui-gap-xl { gap: 30px; }


.user-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}




.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.table-actions form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.table-actions .btn,
.table-actions a.btn {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}


.attachments {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.file-slot {
    position: relative;
    width: 200px;
    height: 85px;
    border-radius: 8px;
    border: 1px dashed #bdbdbd;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    color: #555;
    box-sizing: border-box;
}
.file-slot.filled {
    border-style: solid;
    background: #fff;
}
.file-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.file-slot-name {
    font-size: 10px;
    line-height: 1.2;
    padding: 4px;
    text-align: center;
    word-break: break-word;
}
.file-slot-icon {
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 4px;
    background: #eee;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.file-slot-download {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}


.msg-meta {
    color: #666;
    font-weight: 500;
    font-size: 14px;
    margin-top: 8px;
}
.msg-meta .msg-time {
    margin-left: 8px;
}
