/* ==========================================================================
   Imagic Directory — Moderator Pages
   ========================================================================== */

.imod-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    font-family: inherit;
    color: #222;
}

.imod-page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.imod-page-title .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #717171;
}

.imod-notice { padding: 20px; background: #f5f5f5; border-radius: 10px; text-align: center; }
.imod-notice--error { background: #fee2e2; color: #c62828; }
.imod-empty { color: #9e9e9e; font-size: 14px; padding: 20px; text-align: center; }

/* --- Stats overview ----------------------------------------------------- */
.imod-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.imod-stat {
    background: #f9f9f9;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.imod-stat--warning { background: #fff8e1; border-color: #ffe082; }

.imod-stat__num {
    font-size: 36px;
    font-weight: 800;
    color: #222;
    letter-spacing: -1px;
    line-height: 1;
}

.imod-stat--warning .imod-stat__num { color: #e65100; }

.imod-stat__label {
    font-size: 12px;
    color: #717171;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- 2-column grid ----------------------------------------------------- */
.imod-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* --- Panel -------------------------------------------------------------- */
.imod-panel {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
}

.imod-panel--full {
    grid-column: 1 / -1;
}

.imod-panel__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #222;
}

.imod-panel__title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #717171;
}

/* --- Rank list (top businesses) ---------------------------------------- */
.imod-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.imod-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    counter-increment: rank;
}

.imod-rank-item:last-child { border-bottom: none; }

.imod-rank-item__img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
}

.imod-rank-item__img--empty {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imod-rank-item__img--empty .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #ccc;
}

.imod-rank-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.imod-rank-item__name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imod-rank-item__meta {
    font-size: 12px;
    color: #9e9e9e;
    text-transform: capitalize;
}

.imod-rank-item__value {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.imod-rank-item__value span {
    font-size: 11px;
    font-weight: 400;
    color: #9e9e9e;
}

/* --- Top reviews list -------------------------------------------------- */
.imod-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.imod-review-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.imod-review-item:last-child { border-bottom: none; }

.imod-review-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.imod-review-item__stars {
    font-size: 14px;
    letter-spacing: 1px;
}

.imod-review-item__likes {
    font-size: 13px;
    font-weight: 600;
    color: #e31c5f;
}

.imod-review-item__text {
    font-size: 13px;
    color: #484848;
    line-height: 1.5;
    margin: 0 0 4px;
    font-style: italic;
}

.imod-review-item__meta {
    font-size: 12px;
    color: #9e9e9e;
}

.imod-review-item__meta a {
    color: #484848;
    text-decoration: none;
}

.imod-review-item__meta a:hover { text-decoration: underline; }

/* --- City bars --------------------------------------------------------- */
.imod-city-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.imod-city-bar {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.imod-city-bar__label {
    font-size: 14px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imod-city-bar__track {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.imod-city-bar__fill {
    height: 100%;
    background: #222;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.imod-city-bar__count {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    text-align: right;
}

/* --- Toolbar ------------------------------------------------------------ */
.imod-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.imod-search {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    font-family: inherit;
    transition: border-color 0.15s;
}

.imod-search:focus { outline: none; border-color: #222; }

.imod-filter-tabs {
    display: flex;
    gap: 6px;
}

.imod-tab {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid #ddd;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #484848;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}

.imod-tab:hover { border-color: #222; }

.imod-tab--active {
    background: #222;
    border-color: #222;
    color: #fff;
}

/* --- Table -------------------------------------------------------------- */
.imod-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
}

.imod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.imod-table thead th {
    padding: 12px 16px;
    background: #f9f9f9;
    font-weight: 600;
    color: #484848;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #f0f0f0;
}

.imod-table tbody tr {
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.1s;
}

.imod-table tbody tr:last-child { border-bottom: none; }
.imod-table tbody tr:hover { background: #fafafa; }
.imod-table tbody tr.imod-row--hidden { display: none; }

.imod-table td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #222;
}

/* Name + avatar cells */
.imod-td-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    max-width: 220px;
}

.imod-td-owner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.imod-td-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.imod-row-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
}

.imod-row-img--empty {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imod-row-img--empty .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #ccc;
}

.imod-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    flex-shrink: 0;
}

.imod-meta {
    font-size: 12px;
    color: #9e9e9e;
}

/* Status badges */
.imod-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.imod-status--publish  { background: #e8f5e9; color: #2e7d32; }
.imod-status--pending  { background: #fff8e1; color: #f57f17; }
.imod-status--active   { background: #e8f5e9; color: #2e7d32; }
.imod-status--suspended { background: #fee2e2; color: #c62828; }

/* Action buttons */
.imod-td-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.imod-action-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    color: #717171;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    padding: 0;
    flex-shrink: 0;
}

.imod-action-btn:hover { background: #e8e8e8; color: #222; }
.imod-action-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Approve button states */
.imod-approve-btn { color: #9e9e9e; }
.imod-approve-btn:hover { background: #e8f5e9; color: #2e7d32; }
.imod-approve-btn--active { background: #e8f5e9; color: #2e7d32; }
.imod-approve-btn--active:hover { background: #fee2e2; color: #c62828; }

/* Curator button states */
.imod-curator-btn { color: #9e9e9e; }
.imod-curator-btn:hover { background: #fff8e1; color: #f57f17; }
.imod-curator-btn--active { background: #fff8e1; color: #f57f17; }
.imod-curator-btn--active:hover { background: #f5f5f5; color: #9e9e9e; }

/* Suspend button states */
.imod-suspend-btn { color: #9e9e9e; }
.imod-suspend-btn:hover { background: #fee2e2; color: #c62828; }
.imod-suspend-btn--suspended { background: #fee2e2; color: #c62828; }
.imod-suspend-btn--suspended:hover { background: #e8f5e9; color: #2e7d32; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 800px) {
    .imod-stats { grid-template-columns: repeat(2, 1fr); }
    .imod-grid-2 { grid-template-columns: 1fr; }
    .imod-city-bar { grid-template-columns: 100px 1fr 32px; }
}

@media (max-width: 500px) {
    .imod-stats { grid-template-columns: 1fr 1fr; }
    .imod-toolbar { flex-direction: column; align-items: stretch; }
    .imod-filter-tabs { justify-content: center; }
}
