/* ================================
   FILTER BAR
================================ */
.market-filters {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.market-filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    min-width: 160px;
    flex: 1;
}

/* Compact score fields */
.filter-group.score-field input[type="number"] {
    /* width: 140px;              narrow width */
    padding: 12px 18px;         /* smaller padding */
    font-size: 14px;          /* smaller font */
    border-radius: 8px;       /* keep consistent radius */
}

.filter-group.score-field {
    flex: 0 0 auto !important;
}


.filter-group label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #374151;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
    max-width: 245px;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #2563eb;
    outline: none;
}


.btn-apply-filters {
    padding: 12px 22px;
    background: #2563eb;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    margin-top: 22px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-apply-filters:hover {
    background: #1e40af;
}

.btn-reset-filters {
    padding: 12px 22px;
    background: #eb5325;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    margin-top: 22px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-reset-filters:hover {
    background: #ec2e20;
}


/* ================================
   GRID LAYOUT
================================ */
.market-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}


/* ================================
   CARD STYLE
================================ */
.market-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    margin-bottom: 21px;
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Top section */
.market-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-ad-id {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
}

.market-tag {
    background: #eef2ff;
    color: #4338ca;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* Middle */
.market-card-body {
    margin-top: 15px;
}

.market-price {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}
.market-price span {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

.market-meta p {
    margin: 6px 0;
    font-size: 15px;
}

/* Status badges */
.status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}
.status-active { background: #dcfce7; color: #15803d; }
.status-pending_payment { background: #fef9c3; color: #92400e; }
.status-inactive { background: #fee2e2; color: #b91c1c; }

/* Footer button */
.market-card-footer {
    margin-top: 20px;
}

.btn-view {
    display: inline-block;
    padding: 10px 16px;
    background: #111827;
    color: #fff !important;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-view:hover {
    background: #1f2937;
}

.btn-deactivate {
    display: inline-block;
    padding: 10px 16px;
    background: #ff0000;
    color: #ffffff !important;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-deactivate:hover{
    background: #a01f1f;
}


/* Pagination */
.market-pagination {
    margin-top: 30px;
    text-align: center;
}

/* No results */
.market-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .market-filters-inner {
        display: block;
    }
    .btn-apply-filters {
        width: 100%;
        margin-top: 10px;
    }
}


/* Base badge */
.score-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

/* Score ranges */
.score-zero{
    background: #111827;
    color: #fff;
}
.score-poor {
    background: #b91c1c;
    color: #111827;
}

.score-fair {
    background: #d97706;
    color: #111827;
}

.score-good {
    background: #d0ff00;
    color: #111827;
}

.score-very-good {
    background: #1cd17d;
    color: #111827;
}

.score-excellent {
    background: #00ff00;
    color: #111827;
}

#create-ad-wrapper, 
#lendrise-create-ad-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
}

.create-step h2 {
    margin-bottom: 10px;
}

.consent-box label {
    display: block;
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
}

.btn-next {
    background: #2563eb;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}

.btn-next:hover {
    background: #1e40af;
}

.step-loader {
    margin-top: 20px;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.small-note {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}


.broker-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.broker-header {
    margin-bottom: 30px;
}

.broker-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.stat-card strong {
    font-size: 28px;
    display: block;
}

.broker-section {
    margin-top: 40px;
}


.broker-table-wrapper {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.broker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.broker-table thead {
    background: #f9fafb;
}

.broker-table th,
.broker-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.broker-table td:first-child,   /* ID */
.broker-table td:last-child {   /* actiuni */
    white-space: nowrap;
}

@media (max-width: 768px) {
    .broker-table th:nth-child(2),
    .broker-table td:nth-child(2), /* Categorie */
    .broker-table th:nth-child(6),
    .broker-table td:nth-child(6), /* Vârstă */
    .broker-table th:nth-child(7),
    .broker-table td:nth-child(7) { /* Creat */
        display: none;
    }
}


.broker-table th:nth-child(2), /* Categorie */
.broker-table td:nth-child(2) {
    max-width: 180px;
    white-space: normal;
}

.broker-table th:nth-child(3), /* Tip credit */
.broker-table td:nth-child(3) {
    max-width: 160px;
    white-space: normal;
}


.broker-table th {
    font-weight: 700;
    color: #374151;
    font-size: 14px;
    text-align: left;
}

.broker-table tbody tr:hover {
    background: #f9fafb;
}

.broker-empty {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 16px;
}

.content-wrapper{
    max-width: 1250px !important;
}

.broker-info-pclass{
    font-weight: bold;
    font-size: 19px;
}

.broker-tabs {
    display: flex;
    gap: 12px;
    margin: 18px 0 25px;
    flex-wrap: wrap;
}

.broker-tab {
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    background: #f3f4f6;
    color: #111827;
    font-weight: 600;
}

.broker-tab.active {
    background: #2563eb;
    color: #fff;
}

.broker-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.broker-actions button {
    white-space: nowrap;
    margin-top: 0px;
}

/* status badges pentru consents */
.status-pending   { background: #fef9c3; color: #92400e; }
.status-approved  { background: #dcfce7; color: #15803d; }
.status-completed { background: #e0e7ff; color: #3730a3; }
.status-denied    { background: #fee2e2; color: #b91c1c; }
.status-pending_payment    { background: #fee2e2; color: #b91c1c; }
.status-revoked   { background: #ffe4e6; color: #9f1239; }
.status-in_analysis { background: #d4e210; color: #000000; }

/* ================================
   ACTION BUTTONS
================================ */
.market-action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-add-ad,
.btn-broker-dashboard {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-add-ad {
    background: #10b981;
    color: #ffffff !important;
}

.btn-add-ad:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-broker-dashboard {
    background: #6366f1;
    color: #ffffff !important;
}

.btn-broker-dashboard:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}
