/* COMBINED CSS FILE - style.css */

* {
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f8;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== HEADER (COMMON TO ALL PAGES) ===== */
.instrument_navbar {
    background-color: rgb(0, 0, 103);
    height: auto;
    min-height: 80px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    color: white;
    font-weight: bold;
    padding: 10px 0;
}

.menu {
    display: flex;
    gap: 15px;
    list-style: none;
    margin: 10px 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.menu li {
    position: relative;
}

.menu li a {
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    display: block;
    color: white;
    border-radius: 4px;
}

.menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #a3d0ff;
}

.toggle::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 12px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgb(0, 0, 130);
    min-width: 160px;
    border-radius: 6px;
    padding: 6px 0;
    z-index: 9999;
}

.dropdown-menu a {
    padding: 10px 16px;
    display: block;
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* ===== MAIN CONTAINER ===== */
.container {
    padding: 15px;
    background: #eef2f5;
    min-height: calc(100vh - 160px);
}

/* ===== CHATBOX ===== */
#chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #c08b0e;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 22px;
    z-index: 9999;
}

#chat-widget {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 320px;
    height: 420px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
}

#chat-header {
    background: #c08b0e;
    color: white;
    padding: 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header i {
    cursor: pointer;
}

#chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 13px;
    background: #f8f9fa;
}

.chat-msg {
    margin-bottom: 8px;
    max-width: 75%;
    padding: 8px 10px;
    border-radius: 6px;
    clear: both;
}

.chat-user {
    background: #c08b0e;
    color: white;
    float: right;
}

.chat-admin {
    background: #e4e6eb;
    color: #333;
    float: left;
}

#chat-footer {
    display: flex;
    border-top: 1px solid #ddd;
}

#chat-input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 13px;
    outline: none;
}

#chat-send {
    background: #c08b0e;
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
}


/* ===== PROFILE PAGE ===== */
.container-profile {
    padding-bottom: 80px;
}

.profile-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.profile-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin: 0 15px;
}

.profile-title {
    font-size: 18px;
    font-weight: bold;
    color: #fa653e;
    margin-bottom: 20px;
}

.profile-form-group {
    margin-bottom: 15px;
}

.profile-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    display: block;
}

.profile-input {
    position: relative;
}

.profile-input input {
    width: 100%;
    padding: 10px 36px 10px 10px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.profile-input i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.profile-save-btn {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    max-width: 150px;
}

.profile-save-btn:hover {
    background: #0b5ed7;
}

/* ===== ACTIVITY LOG PAGE ===== */
.form-section {
    background: white;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
}

.form-section h1 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
    font-weight: bold;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 600;
}

.input {
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
}

.btn-search {
    background: #007bff;
    color: white;
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-search:hover {
    background: #0056b3;
}

.btn-reset:hover {
    background: #545b62;
}

/* TABLE SECTION */
.table-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.table-header {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.table-header h2 {
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 10px;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    min-width: 120px;
}

.export-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.export-btn:hover {
    background: #218838;
}

/* TABLE */
.table-container {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 800px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    white-space: nowrap;
}

thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
    font-weight: 600;
}

.no-results {
    color: #6c757d;
    text-align: center;
    padding: 20px;
}

/* STATUS BADGES */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* TABLE FOOTER */
.table-footer {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.entries-info {
    font-size: 13px;
    color: #666;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 5px 10px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    min-width: 32px;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 5px;
    color: #666;
}

/* ===== GENERAL SETTINGS PAGE ===== */
.settings-section {
    background: white;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.settings-section h1 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-container {
    margin-top: 20px;
}

.settings-group {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
    overflow-x: auto;
}

.settings-group h2 {
    font-size: 15px;
    margin: 0 0 15px 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.setting-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    min-width: 600px;
}

@media (min-width: 768px) {
    .setting-row {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 15px;
        align-items: center;
    }
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.setting-control {
    display: flex;
    gap: 15px;
}

.setting-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

select.input {
    width: 100%;
    max-width: 200px;
}

input[type="number"].input {
    width: 100px;
}

/* RADIO GROUP */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.radio-option input[type="radio"] {
    margin: 0;
}

/* SETTINGS ACTIONS */
.settings-action {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    flex-wrap: wrap;
}

/* ===== INSTRUMENT SEARCH PAGE ===== */
.search-section {
    background: white;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.search-section h2 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-description {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 20px;
}

/* TABLE INFO */
.table-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .table-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.entries-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entries-info select {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

/* TABLE */
.results-table-container {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

/* ===== PORTFOLIO PAGES ===== */
/* TABS */
.tabs {
    background: white;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
    overflow-x: auto;
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.tabs button {
    border: none;
    background: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

.tabs .active {
    border-bottom: 2px solid #007bff;
    color: #007bff;
    font-weight: bold;
}

/* FILTER BAR */
.filters {
    background: white;
    padding: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border: 1px solid #dee2e6;
    border-top: none;
}

.filters button,
.filters select,
.filters input {
    padding: 6px 10px;
    font-size: 13px;
    flex: 1;
    min-width: 120px;
}

.filters button {
    cursor: pointer;
}

.filters input {
    flex: 2;
    min-width: 200px;
}

.gray {
    background: #6c757d;
    color: white;
    border: none;
}

.blue {
    background: #007bff;
    color: white;
    border: none;
}

.orange {
    background: #fd7e14;
    color: white;
    border: none;
}

.green {
    background: #027c02;
    color: white;
}

.red {
    background: #de1405;
    color: white;
}

.yellow {
    background-color: #fde214;
    color: black;
    font-weight: bold;

}

/* TABLE WRAPPER */
.table-wrapper {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 10px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
}

.table-wrapper.wide {
    overflow-x: auto;
    max-height: 260px;
}

.no-data {
    color: #6c757d;
    text-align: center;
    padding: 20px;
}

/* PAGINATION */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 5px 12px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    min-width: 60px;
}

.pagination button:disabled {
    opacity: 0.5;
}

/* SUMMARY */
.summary {
    background: white;
    margin-top: 10px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    border: 1px solid #dee2e6;
    font-size: 12px;
}

@media (min-width: 768px) {
    .summary {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* COLUMN COLOR GROUPS */
.bg-yellow {
    background: #fff9db;
}

.bg-blue {
    background: #e7f1ff;
}

.bg-orange {
    background: #fff3e0;
}

.bg-green {
    background: #e8f5e9;
}

.bg-gray {
    background: #e0e0e0;
}

thead .bg-yellow,
thead .bg-blue,
thead .bg-orange,
thead .bg-green {
    font-weight: bold;
    text-align: center;
}

/* SUMMARY CARD */
.summary-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}

.summary-header {
    padding: 10px 12px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

@media (min-width: 768px) {
    .summary-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.summary-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.summary-actions button {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    min-width: 60px;
}

.summary-actions input {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ced4da;
    min-width: 150px;
}

/* ANALYTICS CARDS */
.analytics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.analytics-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.order {
    margin: 15px 0;
}

.analytics-header {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.analytics-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 12px;
}

@media (min-width: 576px) {
    .analytics-stats {
        flex-direction: row;
        justify-content: space-between;
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.stat-value.total {
    color: #007bff;
}

.stat-value.open {
    color: #28a745;
}

.stat-value.closed {
    color: #dc3545;
}

.stat-value.complete {
    color: #28a745;
}

.stat-value.pending {
    color: #ffc107;
}

.stat-value.canceled {
    color: #6c757d;
}

.stat-value.rejected {
    color: #dc3545;
}

.stat-value.utilized {
    color: #fd7e14;
}

.stat-value.available {
    color: #17a2b8;
}

.update-time {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #888;
    display: flex;
    justify-content: space-between;
}

/* HELP */
.help {
    margin-top: 10px;
    background: #d4edda;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #c3e6cb;
    font-size: 14px;
}

/* ===== FOOTER (COMMON TO ALL PAGES) ===== */
.footer-main {
    margin-top: 40px;
}

.p-margins {
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-bottom {
    background: #343a40;
    padding: 15px;
    text-align: center;
}

.copyright {
    color: #adb5bd;
    font-size: 14px;
    margin: 0;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .instrument_navbar {
        padding: 0 15px;
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .logo {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .menu {
        gap: 8px;
        justify-content: center;
    }

    .menu li a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .container {
        padding: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn {
        min-width: 100px;
        padding: 8px 12px;
    }

    .table-header {
        padding: 10px;
    }

    .table-controls {
        width: 100%;
    }

    .search-box {
        min-width: 150px;
    }

    table {
        font-size: 11px;
    }

    th,
    td {
        padding: 6px 4px;
    }

    .settings-group {
        padding: 10px;
    }

    .filters button,
    .filters select,
    .filters input {
        min-width: 100px;
        flex: 1 0 calc(50% - 8px);
    }

    .analytics-card {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .instrument_navbar {
        padding: 10px;
    }

    .menu {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 5px;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
        position: static;
    }

    .btn {
        width: 100%;
    }

    .form-buttons {
        flex-direction: column;
    }

    .table-controls {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }

    .export-btn {
        width: 100%;
    }

    .pagination {
        flex-direction: column;
        gap: 10px;
    }

    .filters button,
    .filters select,
    .filters input {
        flex: 1 0 100%;
    }

    .settings-action {
        flex-direction: column;
        gap: 10px;
    }

    .settings-action .btn {
        width: 100%;
        max-width: 100%;
    }
}