-- Coach certification applications (Part 12 → certification.php)
CREATE TABLE IF NOT EXISTS coach_certification_applications (
    id              INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    user_id         INT UNSIGNED NOT NULL,
    full_name       VARCHAR(180) NOT NULL,
    email           VARCHAR(255) NOT NULL,
    phone           VARCHAR(40)  DEFAULT NULL,
    location        VARCHAR(180) DEFAULT NULL,
    current_work    VARCHAR(255) DEFAULT NULL,
    why_coach       TEXT,
    transformation  TEXT,
    teaching_xp     TEXT,
    audience        TEXT,
    hours_per_week  VARCHAR(60)  DEFAULT NULL,
    start_when      VARCHAR(60)  DEFAULT NULL,
    anything_else   TEXT,
    consent_contact TINYINT(1)   NOT NULL DEFAULT 0,
    status          VARCHAR(40)  NOT NULL DEFAULT 'new',
    admin_notes     TEXT,
    created_at      TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at      TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX idx_cert_user (user_id),
    INDEX idx_cert_status (status)
);
