/* =========================================================
   Broker for Boat — Admin Styles
   ========================================================= */

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.broker-admin-header {
    background: #fff;
    color: #1f2937;
    padding: 24px 28px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.broker-logo {
    width: 56px;
    height: 56px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.broker-header-content h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}
.broker-header-content p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #6b7280;
}

/* ----------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------- */
.broker-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.broker-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

/* ----------------------------------------------------------
   Card
   ---------------------------------------------------------- */
.broker-card {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}
.broker-card h2 {
    margin: 0 0 18px;
    font-size: 17px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}
.broker-card .dashicons {
    color: #0073aa;
}

/* ----------------------------------------------------------
   Section (within card)
   ---------------------------------------------------------- */
.broker-section {
    margin-bottom: 24px;
}
.broker-section:last-child {
    margin-bottom: 0;
}
.broker-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 7px;
}
.broker-section-title .dashicons {
    color: #0073aa;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ----------------------------------------------------------
   Form elements
   ---------------------------------------------------------- */
.broker-form-group {
    margin-bottom: 14px;
}
.broker-form-group:last-child {
    margin-bottom: 0;
}
.broker-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    font-size: 13px;
}
.broker-form-group input[type="text"],
.broker-form-group input[type="email"],
.broker-form-group select,
.broker-form-group textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    background: #fff;
    color: #111827;
}
.broker-form-group input[type="text"]:focus,
.broker-form-group input[type="email"]:focus,
.broker-form-group select:focus,
.broker-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
}
.broker-form-group .description {
    margin-top: 3px;
    font-size: 12px;
    color: #6b7280;
}
.broker-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ----------------------------------------------------------
   Save button
   ---------------------------------------------------------- */
.broker-save-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    width: 100%;
    margin-top: 20px;
}
.broker-save-button:hover {
    background: #005a87;
}

/* ----------------------------------------------------------
   Stats cards (Boats page)
   ---------------------------------------------------------- */
.broker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 0 0 20px;
}
.broker-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stat-icon {
    font-size: 22px;
    color: #0073aa;
}
.stat-content h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}
.stat-content p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 12px;
}

/* ----------------------------------------------------------
   Search bar (Boats page)
   ---------------------------------------------------------- */
.broker-search-bar {
    margin: 0 0 14px;
}
.broker-search-bar form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.broker-search-input {
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 280px;
    transition: border-color 0.15s ease;
}
.broker-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
}

/* ----------------------------------------------------------
   Boats table
   ---------------------------------------------------------- */
.boat-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.boat-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.status-published { background: #d1fae5; color: #065f46; }
.status-draft     { background: #fef3c7; color: #92400e; }
.status-private   { background: #fee2e2; color: #991b1b; }

td.actions {
    display: flex;
    gap: 4px;
    align-items: center;
}
.bfb-delete-btn {
    border-color: #fca5a5 !important;
    background: #fef2f2 !important;
}
.bfb-delete-btn:hover {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
}

/* ----------------------------------------------------------
   Pagination
   ---------------------------------------------------------- */
.broker-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 10px 0;
}
.broker-pagination-info {
    color: #6b7280;
    font-size: 13px;
}
.broker-pagination-links {
    display: flex;
    gap: 4px;
}
.broker-pagination-links a,
.broker-pagination-links span {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}
.broker-pagination-links a {
    color: #374151;
    background: #fff;
}
.broker-pagination-links a:hover {
    background: #f3f4f6;
    border-color: #0073aa;
    color: #0073aa;
}
.broker-pagination-links .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ----------------------------------------------------------
   Maintenance — action buttons
   ---------------------------------------------------------- */
.broker-action-button {
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}
.broker-action-button:hover {
    filter: brightness(0.9);
}
.broker-action-button .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #fff;
}
.broker-action-desc {
    margin: 5px 0 14px;
    font-size: 12px;
    color: #6b7280;
}

/* ----------------------------------------------------------
   Debug section
   ---------------------------------------------------------- */
.bfb-debug-toggle {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 12px;
}
.bfb-debug-toggle:hover {
    background: #f3f4f6;
}
.bfb-debug-body {
    display: none;
}
.bfb-debug-body.open {
    display: block;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 960px) {
    .broker-settings-grid,
    .broker-cards-container {
        grid-template-columns: 1fr;
    }
    .broker-form-row {
        grid-template-columns: 1fr;
    }
}
