/* ==========================================================================
   Port Ledger design system
   Scoped, additive classes (prefixed pl-) layered on top of the existing
   Rubick admin theme. Nothing here overrides base theme classes, so pages
   that haven't been migrated to these classes are unaffected.
   ========================================================================== */

/* ---- Page header ---- */
.pl-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

.pl-page-head h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: #1c2536;
}

.pl-page-head p {
    margin: 0.2rem 0 0;
    color: #8a99ac;
    font-size: 0.875rem;
}

.pl-page-head-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pl-date,
.pl-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
}

/* ---- Cards ---- */
.pl-card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #eef1f6;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.pl-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f3f8;
}

.pl-card-head h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #1c2536;
}

.pl-card-body {
    padding: 1.1rem 1.25rem 1.4rem;
}

/* ---- Buttons ---- */
.pl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
    cursor: pointer;
}

.pl-btn svg,
.pl-btn i {
    width: 15px;
    height: 15px;
}

.pl-btn:active {
    transform: translateY(1px);
}

.pl-btn-primary {
    background: rgb(28, 63, 170);
    color: #fff;
    box-shadow: 0 1px 2px rgba(28, 63, 170, .25);
}

.pl-btn-primary:hover {
    background: rgb(23, 52, 141);
    color: #fff;
}

.pl-btn-ghost {
    background: #fff;
    color: #475569;
    border-color: #e2e8f0;
}

.pl-btn-ghost:hover {
    background: #f8fafc;
    color: #1c2536;
}

.pl-btn-danger {
    background: rgb(211, 41, 41);
    color: #fff;
    box-shadow: 0 1px 2px rgba(211, 41, 41, .25);
}

.pl-btn-danger:hover {
    background: rgb(179, 30, 30);
    color: #fff;
}

.pl-btn-warning {
    background: #fff;
    color: rgb(154, 90, 4);
    border-color: rgba(247, 139, 0, .35);
}

.pl-btn-warning:hover {
    background: rgba(247, 139, 0, .08);
}

.pl-btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

/* ---- Table ---- */
.pl-table-wrap {
    overflow-x: auto;
}

.pl-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pl-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a99ac;
    background: #f8fafc;
    border-bottom: 1px solid #eef1f6;
    font-weight: 700;
    padding: 0.75rem 0.9rem;
    text-align: left;
    white-space: nowrap;
}

.pl-table tbody td {
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f8;
    font-size: 0.875rem;
    padding: 0.7rem 0.9rem;
    color: #334155;
}

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

.pl-table tbody tr:hover {
    background: #fafbfe;
}

.pl-table-meta {
    color: #8a99ac;
    font-size: 0.8rem;
}

/* ---- Status pills ---- */
.pl-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    white-space: nowrap;
}

.pl-pill svg {
    width: 13px;
    height: 13px;
}

.pl-pill-success {
    background: rgba(145, 199, 20, .13);
    color: rgb(103, 143, 13);
}

.pl-pill-muted {
    background: rgba(148, 163, 184, .16);
    color: rgb(100, 116, 139);
}

.pl-pill-danger {
    background: rgba(211, 41, 41, .1);
    color: rgb(211, 41, 41);
}

/* ---- Pagination (wraps Laravel's default paginator markup) ---- */
.pl-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}

.pl-pagination-wrap nav > .pagination {
    margin: 0;
}

.pl-pagination-wrap .page-link {
    border-radius: 0.5rem;
    margin: 0 2px;
    border-color: #eef1f6;
    color: #475569;
    font-size: 0.82rem;
}

.pl-pagination-wrap .page-item.active .page-link {
    background: rgb(28, 63, 170);
    border-color: rgb(28, 63, 170);
}

/* ---- Small stat tiles (for summaries within a card, not the dashboard KPI cards) ---- */
.pl-stat-tile {
    border: 1px solid #eef1f6;
    border-radius: 0.6rem;
    padding: 0.9rem 1rem;
}

.pl-stat-tile-label {
    font-size: 0.78rem;
    color: #8a99ac;
}

.pl-stat-tile-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1c2536;
    margin-top: 0.15rem;
}

/* ---- Empty state ---- */
.pl-empty {
    text-align: center;
    color: #a3adba;
    padding: 2.5rem 0;
    font-size: 0.875rem;
}

/* ---- Alert banners ---- */
.pl-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border-radius: 0.65rem;
    padding: 0.85rem 1.1rem;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.pl-alert svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 0.1rem;
}

.pl-alert-warning {
    background: rgba(247, 139, 0, .1);
    color: rgb(154, 90, 4);
}

.pl-alert-success {
    background: rgba(145, 199, 20, .13);
    color: rgb(88, 122, 11);
}

.pl-alert-danger {
    background: rgba(211, 41, 41, .1);
    color: rgb(211, 41, 41);
}

.pl-alert-info {
    background: rgba(28, 63, 170, .08);
    color: rgb(28, 63, 170);
}

.pl-pill-info {
    background: rgba(28, 63, 170, .1);
    color: rgb(28, 63, 170);
}

/* ---- DataTables chrome (applies globally to any jQuery DataTable) ---- */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter label {
    color: #8a99ac;
    font-size: 0.82rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.5rem !important;
    border-color: #eef1f6 !important;
    color: #475569 !important;
    font-size: 0.82rem !important;
    padding: 0.35rem 0.7rem !important;
    margin-left: 3px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgb(28, 63, 170) !important;
    border-color: rgb(28, 63, 170) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #cbd5e1 !important;
}

.dt-buttons .btn,
.dt-button {
    border-radius: 0.5rem !important;
    font-size: 0.8rem !important;
}

table.dataTable thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a99ac;
    background: #f8fafc;
    font-weight: 700;
}

/* ---- Logo badge ----
   The Port Ledger mark uses brand-blue/green fills, so it must never sit
   directly on a colored surface (sidebar, login hero panel) or it disappears
   into the background. This wraps it in an explicit white card wherever it
   appears outside a naturally white page (print headers, plain content areas
   don't need it). */
.pl-logo-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 0.6rem;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.pl-logo-badge img {
    display: block;
}
