/* ==========================================================================
   Clickseffect Services Manager — Public Styles
   ========================================================================== */

/* ── Base wrap ─────────────────────────────────────────────────────────────── */
.ce-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e2a36;
}

/* ── Messages ──────────────────────────────────────────────────────────────── */
.ce-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid transparent;
}
.ce-message.ce-success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}
.ce-message.ce-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.ce-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}
.ce-btn-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.ce-btn-primary:hover {
    background: #005c8a;
    color: #fff;
    border-color: #005c8a;
}
.ce-btn-outline {
    background: transparent;
    color: #0073aa;
    border-color: #0073aa;
}
.ce-btn-outline:hover {
    background: #0073aa;
    color: #fff;
}
.ce-btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.ce-btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.ce-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ── Auth pages ────────────────────────────────────────────────────────────── */
.ce-auth-wrap {
    max-width: 520px;
}
.ce-auth-switch {
    margin-top: 16px;
    font-size: 14px;
    color: #555;
}
.ce-auth-switch a {
    color: #0073aa;
    text-decoration: none;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.ce-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ce-field {
    margin-bottom: 18px;
}
.ce-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}
.ce-field .required {
    color: #ef4444;
}
.ce-field input[type="text"],
.ce-field input[type="email"],
.ce-field input[type="password"],
.ce-field input[type="tel"],
.ce-field input[type="url"],
.ce-field input[type="date"],
.ce-field input[type="number"],
.ce-field select,
.ce-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
    transition: border-color 0.15s;
    background: #fff;
}
.ce-field input:focus,
.ce-field select:focus,
.ce-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}
.ce-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .ce-field-row { grid-template-columns: 1fr; }
}
.ce-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 14px;
}

/* ── Page header ───────────────────────────────────────────────────────────── */
.ce-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.ce-page-header h2 {
    margin: 0;
    font-size: 22px;
    color: #111827;
}

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.ce-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.ce-dashboard-header h2 {
    margin: 0;
    font-size: 22px;
}
.ce-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .ce-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ce-stats-grid { grid-template-columns: 1fr; }
}
.ce-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.ce-stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
}
.ce-stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Dashboard nav ─────────────────────────────────────────────────────────── */
.ce-dash-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 600px) {
    .ce-dash-nav { grid-template-columns: 1fr; }
}
.ce-nav-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: #1e2a36;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ce-nav-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,115,170,.12);
    color: #1e2a36;
}
.ce-nav-card .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #0073aa;
}
.ce-nav-card strong {
    font-size: 15px;
}
.ce-nav-card small {
    font-size: 12px;
    color: #6b7280;
}

/* ── Services grid ─────────────────────────────────────────────────────────── */
.ce-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.ce-service-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ce-service-card.ce-status-active {
    border-left: 4px solid #10b981;
}
.ce-service-card.ce-status-cancelled {
    border-left: 4px solid #ef4444;
    opacity: .75;
}
.ce-service-card.ce-status-completed {
    border-left: 4px solid #6b7280;
}
.ce-service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.ce-service-header h3 {
    margin: 0;
    font-size: 15px;
}
.ce-service-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
    line-height: 1.5;
}
.ce-service-meta {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 14px;
}
.ce-service-meta th,
.ce-service-meta td {
    padding: 5px 0;
    vertical-align: top;
}
.ce-service-meta th {
    color: #6b7280;
    font-weight: 600;
    width: 40%;
}
.ce-service-price {
    font-size: 14px;
    margin: 10px 0;
}

.ce-section-title {
    margin: 40px 0 16px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}
.ce-section-title h3 {
    margin: 0 0 6px;
}
.ce-section-title p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}
.ce-catalogue .ce-service-card {
    border-left: none;
    opacity: 1;
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.ce-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    background: #e5e7eb;
    color: #374151;
}
.ce-badge-active    { background: #d1fae5; color: #065f46; }
.ce-badge-pending   { background: #fef3c7; color: #92400e; }
.ce-badge-replied           { background: #dbeafe; color: #1e40af; }
.ce-badge-checkout_pending  { background: #fef3c7; color: #92400e; }
.ce-badge-accepted  { background: #d1fae5; color: #065f46; }
.ce-badge-refused   { background: #fee2e2; color: #7f1d1d; }
.ce-badge-cancelled { background: #f3f4f6; color: #6b7280; }
.ce-badge-paid      { background: #d1fae5; color: #065f46; }
.ce-badge-issued    { background: #dbeafe; color: #1e40af; }
.ce-badge-overdue   { background: #fee2e2; color: #7f1d1d; }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.ce-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.ce-table thead {
    background: #f8fafc;
}
.ce-table th,
.ce-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.ce-table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
.ce-table tbody tr:last-child td {
    border-bottom: none;
}
.ce-table tbody tr:hover {
    background: #f8fafc;
}

/* ── Section ───────────────────────────────────────────────────────────────── */
.ce-section {
    margin-bottom: 40px;
}
.ce-section h3 {
    font-size: 17px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* ── Quote cards ───────────────────────────────────────────────────────────── */
.ce-quote-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ce-quote-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ce-quote-header strong {
    font-size: 15px;
    flex: 1;
}
.ce-date {
    font-size: 12px;
    color: #9ca3af;
}
.ce-admin-reply {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    font-size: 13px;
}
.ce-admin-reply strong {
    display: block;
    margin-bottom: 6px;
    color: #0369a1;
}
.ce-quote-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.ce-refuse-panel {
    margin-top: 14px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 14px;
}
.ce-refuse-panel textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.ce-refuse-note {
    font-size: 13px;
    color: #7f1d1d;
    background: #fef2f2;
    padding: 8px 12px;
    border-radius: 6px;
}
.ce-empty-note {
    color: #9ca3af;
    font-style: italic;
    font-size: 14px;
}
.ce-empty {
    text-align: center;
    padding: 48px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}
.ce-empty p {
    font-size: 15px;
    color: #9ca3af;
    margin-bottom: 20px;
}
