/* Arqam360 WordPress Admin Styles
 * Mirrors the dashboard / marketing visual vocabulary:
 *   - Bordered card panels with uppercase tracking-wider section headers
 *   - Tone palette: emerald (success) · amber (warn) · red (error) · ochre (#C4753B brand)
 *   - Dense field rows in card bodies (no <table class="form-table">)
 * All selectors scoped to .arqam360-* so other plugins are not affected.
 */

/* ── Settings page wrapper ── */

.arqam360-settings {
    max-width: 880px;
    margin: 20px 0;
}

.arqam360-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1d2327;
}

.arqam360-subtitle {
    color: #646970;
    font-size: 13px;
    margin: 0 0 20px;
    line-height: 1.5;
}

.arqam360-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #061225;
    color: #C4753B;
    font-size: 22px;
    font-weight: 700;
    border-radius: 6px;
    font-family: 'Tajawal', 'Arial', sans-serif;
    flex-shrink: 0;
}

/* ── Connection status pill ── */

.arqam360-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.arqam360-status--connected {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.arqam360-status--error {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.arqam360-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.arqam360-status--connected .arqam360-status__dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.arqam360-status--error .arqam360-status__dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ── Card-grouped sections (dashboard parity) ── */

.arqam360-card {
    background: #fff;
    border: 1px solid #d0d4d9;
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: hidden;
}

.arqam360-card__header {
    background: #f6f7f7;
    border-bottom: 1px solid #d0d4d9;
    padding: 9px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #646970;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arqam360-card__hint {
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #8c8f94;
}

.arqam360-card__body {
    padding: 16px;
}

/* ── Field rows ── */

.arqam360-field {
    margin-bottom: 16px;
}

.arqam360-field:last-child {
    margin-bottom: 0;
}

.arqam360-field__label {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 6px;
    font-size: 13px;
}

.arqam360-field__hint {
    color: #646970;
    font-size: 12px;
    margin: 6px 0 0;
    line-height: 1.5;
}

.arqam360-field input[type="text"],
.arqam360-field input[type="url"] {
    width: 100%;
    max-width: 480px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    padding: 6px 10px;
}

.arqam360-field input[type="text"]:focus,
.arqam360-field input[type="url"]:focus {
    border-color: #C4753B;
    box-shadow: 0 0 0 1px #C4753B;
}

/* Checkbox / radio group inside a card body */

.arqam360-checks label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.5;
    cursor: pointer;
}

.arqam360-checks label:last-child {
    margin-bottom: 0;
}

.arqam360-checks input[type="checkbox"],
.arqam360-checks input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Submit row */

.arqam360-submit {
    margin-top: 18px;
}

.arqam360-submit .button-primary {
    background: #C4753B;
    border-color: #A05E2C;
    color: #fff;
    text-shadow: none;
    box-shadow: none;
    padding: 4px 18px;
    font-weight: 600;
}

.arqam360-submit .button-primary:hover,
.arqam360-submit .button-primary:focus {
    background: #A05E2C;
    border-color: #A05E2C;
}

/* ── Footer ── */

.arqam360-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e4e7;
    color: #646970;
    font-size: 12px;
}

.arqam360-footer a {
    color: #C4753B;
    text-decoration: none;
    font-weight: 600;
}

.arqam360-footer a:hover {
    text-decoration: underline;
}

/* ── Dashboard page (iframe wrapper + empty state) ── */

body.arqam360-dashboard-active #wpcontent {
    padding-left: 0 !important;
}

.arqam360-dashboard-frame {
    position: fixed;
    inset: 32px 0 0 160px;
    background: #061225;
}

body.folded .arqam360-dashboard-frame {
    left: 36px;
}

.arqam360-dashboard-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.arqam360-dashboard-empty {
    max-width: 560px;
    margin: 24px 0;
    padding: 32px;
    background: #fff;
    border: 1px solid #d0d4d9;
    border-radius: 6px;
    text-align: center;
}

.arqam360-dashboard-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(196, 117, 59, 0.12);
    color: #C4753B;
    margin: 0 auto 16px;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

.arqam360-dashboard-empty h1 {
    font-size: 20px;
    margin: 0 0 8px;
    color: #1d2327;
}

.arqam360-dashboard-empty p {
    color: #475569;
    margin: 6px 0;
    line-height: 1.5;
}

.arqam360-dashboard-empty__notice {
    text-align: left;
    padding: 12px;
    margin: 16px 0 0;
}

.arqam360-dashboard-empty__actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.arqam360-cta {
    display: inline-block;
    padding: 8px 18px;
    background: #C4753B;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.arqam360-cta:hover,
.arqam360-cta:focus {
    background: #A05E2C;
    color: #fff !important;
}

.arqam360-cta--ghost {
    background: transparent;
    color: #C4753B !important;
    border: 1px solid rgba(196, 117, 59, 0.4);
}

.arqam360-cta--ghost:hover,
.arqam360-cta--ghost:focus {
    background: rgba(196, 117, 59, 0.08);
    color: #C4753B !important;
}
