/* Intervision NMS UI Standard */

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
}

.page-toolbar-right {
    margin-left: auto;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-link,
.btn-primary,
.btn-secondary,
.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

.btn-primary {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.btn-secondary {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-warning {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.btn-warning:hover {
    background: #fecaca;
}

.table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.actions-col-fixed {
    width: 160px;
    white-space: nowrap;
}

.action-buttons-right {
    justify-content: flex-end;
}

.nms-page-title {
    margin-bottom: 4px;
}

.nms-muted {
    color: #64748b;
    font-size: 14px;
}

/* Refined table action buttons */
.table .action-buttons .btn-secondary,
.table .action-buttons .btn-primary {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.table .action-buttons .btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.table .action-buttons .btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.table .action-buttons .btn-primary {
    background: #1d4ed8;
    color: #ffffff;
    border: 1px solid #1d4ed8;
}

.table .action-buttons .btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* Global refined buttons */
.btn-link,
.btn-primary,
.btn-secondary,
.btn-warning,
button.btn-primary,
button.btn-secondary,
button.btn-warning {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.btn-link:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-warning:hover,
button:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #1d4ed8;
    color: #ffffff;
    border: 1px solid #1d4ed8;
}

.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    box-shadow: 0 6px 14px rgba(29, 78, 216, .18);
}

.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

.btn-warning {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.btn-warning:hover {
    background: #fecaca;
    border-color: #f87171;
}

/* Compact table buttons */
.table .action-buttons .btn-secondary,
.table .action-buttons .btn-primary {
    min-height: 34px;
    padding: 6px 12px;
}

/* Unify primary blue with Search button */
.btn-primary,
button.btn-primary,
.locations-search-btn {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

.btn-primary:hover,
button.btn-primary:hover,
.locations-search-btn:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
    box-shadow: 0 6px 14px rgba(29, 78, 216, .18);
}

/* Locations toolbar refinement */
.page-toolbar {
    align-items: center !important;
}

.page-toolbar > div:first-child .action-buttons {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.locations-filter-form {
    flex-wrap: nowrap !important;
}

.table td:nth-child(3),
.table th:nth-child(3) {
    white-space: nowrap;
}

.btn-primary {
    background: #1f5fbf !important;
    border-color: #1f5fbf !important;
}

.btn-primary:hover {
    background: #174ea6 !important;
    border-color: #174ea6 !important;
}

.locations-search-btn {
    background: #1f5fbf !important;
    border-color: #1f5fbf !important;
}

.locations-search-btn:hover {
    background: #174ea6 !important;
}

/* Locations action buttons - final refined style */
.page-toolbar .action-buttons .btn-primary,
.page-toolbar .action-buttons .btn-secondary {
    min-height: 58px;
    padding: 10px 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.page-toolbar .action-buttons .btn-primary {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.page-toolbar .action-buttons .btn-primary:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
}

.page-toolbar .action-buttons .btn-secondary {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.page-toolbar .action-buttons .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

.btn-icon {
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

.table .action-buttons .btn-primary,
.table .action-buttons .btn-secondary {
    font-weight: 600 !important;
    font-size: 14px;
}

/* Final button color/font tuning */
.page-toolbar .action-buttons .btn-primary {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.page-toolbar .action-buttons .btn-primary:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
}

.table .action-buttons .btn-primary,
.table .action-buttons .btn-secondary {
    font-weight: 500 !important;
}

.table .action-buttons .btn-primary {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Locations table footer / pagination */
.locations-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.table-info {
    font-size: 13px;
    color: #475569;
}

.pagination-ui {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-weight: 600;
}

.pagination-btn.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.pagination-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* NMS unified button style */
.btn-link,
.btn-primary,
.btn-secondary,
.btn-warning,
button,
input[type="submit"] {
    min-height: 36px !important;
    padding: 7px 13px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary {
    background: #1d4ed8 !important;
    border: 1px solid #1d4ed8 !important;
    color: #ffffff !important;
}

.btn-secondary,
.btn-link.btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.table .btn-primary,
.table .btn-secondary {
    font-weight: 500 !important;
    min-height: 36px !important;
    padding: 7px 13px !important;
}

/* Back buttons standard */
a.btn-secondary[href*="back"],
a.btn-secondary {
    font-weight: 500 !important;
}

/* Final global primary blue standard */
:root {
    --nms-primary-blue: #1d4ed8;
    --nms-primary-blue-hover: #1e40af;
}

.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary,
.locations-search-btn,
.pagination-btn.active {
    background: var(--nms-primary-blue) !important;
    border-color: var(--nms-primary-blue) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
button.btn-primary:hover,
input[type="submit"].btn-primary:hover,
.locations-search-btn:hover,
.pagination-btn.active:hover {
    background: var(--nms-primary-blue-hover) !important;
    border-color: var(--nms-primary-blue-hover) !important;
    color: #ffffff !important;
}

/* Force same primary blue everywhere */
a.btn-link.btn-primary,
a.btn-primary,
button.btn-primary,
.btn-primary,
input[type="submit"].btn-primary {
    background-color: #1d4ed8 !important;
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

a.btn-link.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:hover,
input[type="submit"].btn-primary:hover {
    background-color: #1e40af !important;
    background: #1e40af !important;
    border-color: #1e40af !important;
    color: #ffffff !important;
}

.search-results {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 10;
    width: 300px;
}

.search-results div {
    padding: 8px;
    cursor: pointer;
}

.search-results div:hover {
    background: #f1f5f9;
}

/* form-label-readable-strong */
.form-card > label,
.form-card .identifier-row label {
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 6px !important;
    display: block !important;
}
/* end-form-label-readable-strong */
