/* =============================================
   Business Development Health Score
   Brand: camleadership.com
   Primary Green: #A5C740
   Dark Navy: #2C3F59
   Teal: #7EBEC5
   Heading Font: Titillium Web
   Body Font: Poppins
   ============================================= */

/* --- Global Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', 'Open Sans', Arial, sans-serif;
    color: #666;
    background: #fff;
    line-height: 1.6;
}

/* --- Container --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-container {
    max-width: 1200px;
}

/* --- Logo & Header --- */
.logo {
    display: block;
    max-width: 220px;
    margin: 0 auto 20px;
}

h1 {
    font-family: 'Titillium Web', 'Poppins', Helvetica, Arial, sans-serif;
    color: #2C3F59;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    color: #7EBEC5;
    font-size: 16px;
    margin-bottom: 30px;
}

/* --- Section Headers --- */
h2 {
    font-family: 'Titillium Web', 'Poppins', Helvetica, Arial, sans-serif;
    color: #2C3F59;
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 3px solid #A5C740;
}

.section-desc {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
}

/* --- Contact Section --- */
.contact-section {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2C3F59;
    margin-bottom: 5px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-color: #A5C740;
    outline: none;
    box-shadow: 0 0 0 2px rgba(165, 199, 64, 0.15);
}

/* --- Rating Legend --- */
.rating-legend {
    background: #f9f9f9;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* --- Question Blocks --- */
.question {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.question.unanswered {
    border-color: #e74c3c;
    background: #fef5f5;
}

.question-header {
    margin-bottom: 8px;
}

.question-num {
    font-weight: 600;
    color: #A5C740;
    margin-right: 5px;
}

.question-title {
    font-weight: 500;
    color: #2C3F59;
    font-size: 15px;
}

.question-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* --- Rating Chips --- */
.rating-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    cursor: pointer;
    flex: 1 1 0;
    min-width: 0;
}

.chip input[type="radio"] {
    display: none;
}

.chip span {
    display: block;
    padding: 8px 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
    user-select: none;
    text-align: center;
    white-space: nowrap;
}

.chip:hover span {
    border-color: #A5C740;
    color: #A5C740;
}

.chip input[type="radio"]:checked + span {
    background: #A5C740;
    color: #fff;
    border-color: #A5C740;
}

/* --- Submit Button --- */
.submit-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    padding: 14px 40px;
    background: #A5C740;
    color: #2C3F59;
    border: 4px solid #A5C740;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: #93b236;
    border-color: #93b236;
}

/* --- Admin Header Bar --- */
.admin-header {
    background: #2C3F59;
    padding: 15px 20px;
    margin: -40px -20px 30px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header h1 {
    color: #fff;
    margin-bottom: 0;
    font-size: 22px;
}

.admin-header .subtitle {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.admin-header-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.admin-header .back-link {
    color: #A5C740;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.admin-header .back-link:hover {
    color: #B3C410;
}

.btn-export {
    display: inline-block;
    padding: 6px 14px;
    background: #A5C740;
    color: #2C3F59;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 3px;
}

.btn-export:hover {
    background: #93b236;
}

.admin-header .logo {
    max-width: 140px;
    margin: 0;
}

/* --- Admin Table --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 20px;
}

.admin-table th {
    background: #2C3F59;
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    color: #fff;
    border-bottom: 3px solid #A5C740;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 13px;
}

.admin-table th:hover {
    background: #3a5070;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* --- Column Widths (5-column layout) --- */
.admin-table .col-date { width: 90px; }
.admin-table .col-submission { }
.admin-table .col-scores { width: 180px; }
.admin-table .col-emails { width: 100px; }
.admin-table .col-actions { width: 130px; }

.summary-row:hover {
    background: #f9f9f9;
}

/* --- Submission Cell (company + contact stacked) --- */
.submission-cell {
    line-height: 1.4;
}

.submission-company {
    font-weight: 600;
    color: #2C3F59;
    font-size: 14px;
}

.submission-contact {
    font-size: 12px;
    color: #999;
}

/* --- Scores Cell (overall + section breakdown) --- */
.scores-cell {
    white-space: nowrap;
}

.score-overall {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.score-num {
    font-size: 20px;
    font-weight: 700;
    color: #2C3F59;
    line-height: 1;
}

.score-sections {
    display: flex;
    gap: 10px;
}

.section-score {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

/* --- Emails Cell (dot indicators) --- */
.emails-cell {
    text-align: center;
}

.email-indicators {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.email-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.email-dot-label {
    font-size: 11px;
    color: #999;
}

.dot-delivered {
    background: #A5C740;
}

.dot-sent {
    background: #ddd;
}

.dot-bounced,
.dot-complained {
    background: #e74c3c;
}

.dot-none {
    background: #eee;
}

/* --- Actions Cell --- */
.actions-cell {
    white-space: nowrap;
}

/* --- Health Band Badges --- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-thriving {
    background: #eef5db;
    color: #7a9a1e;
}

.badge-developing {
    background: #e3f3f5;
    color: #5a9aa3;
}

.badge-needs-attention {
    background: #fef9e7;
    color: #f39c12;
}

.badge-at-risk {
    background: #fdedec;
    color: #e74c3c;
}

/* --- Email Status Badges (used in detail view) --- */
.email-status-cell {
    text-align: center;
}

/* --- Detail Row --- */
.detail-row td {
    background: #fafafa;
    padding: 20px;
}

.detail-section {
    margin-bottom: 15px;
}

.detail-section h3 {
    font-family: 'Titillium Web', 'Poppins', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #2C3F59;
    margin-bottom: 8px;
    font-weight: 700;
}

.detail-question {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    font-size: 13px;
}

.detail-q-num {
    color: #A5C740;
    font-weight: 600;
    min-width: 25px;
}

.detail-q-title {
    flex: 1;
    color: #2C3F59;
}

.detail-q-rating {
    color: #666;
    white-space: nowrap;
}

.detail-contact {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-contact h3 {
    font-family: 'Titillium Web', 'Poppins', Helvetica, Arial, sans-serif;
    color: #2C3F59;
    font-weight: 700;
}

.detail-contact p {
    margin: 3px 0;
    font-size: 13px;
}

/* --- Notification Recipients Panel --- */
.notifications-panel {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.notifications-panel h2 {
    margin-top: 0;
}

.notif-list {
    list-style: none;
    margin: 0 0 15px;
}

.notif-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.notif-email {
    font-size: 14px;
    color: #2C3F59;
}

.notif-delete-form {
    display: inline;
}

.btn-notif-delete {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}

.btn-notif-delete:hover {
    color: #e74c3c;
}

.notif-empty {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
}

.notif-add-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
}

.notif-add-form input[type="email"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
}

.notif-add-form input[type="email"]:focus {
    border-color: #A5C740;
    outline: none;
    box-shadow: 0 0 0 2px rgba(165, 199, 64, 0.15);
}

.btn-notif-add {
    padding: 8px 20px;
    background: #A5C740;
    color: #2C3F59;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-notif-add:hover {
    background: #93b236;
}

/* --- Action Buttons --- */
.btn-expand,
.btn-delete,
.btn-export-row {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    font-family: inherit;
    background: #fff;
    text-decoration: none;
    color: #666;
    display: inline-block;
}

.btn-expand:hover,
.btn-export-row:hover {
    border-color: #A5C740;
    color: #A5C740;
}

.btn-delete {
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: #fff;
}

/* --- Back Link --- */
.back-link {
    color: #A5C740;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.back-link:hover {
    color: #B3C410;
    text-decoration: underline;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

.empty-state a {
    color: #A5C740;
    text-decoration: none;
    font-weight: 700;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* --- Green Divider Accent --- */
.divider {
    width: 60px;
    height: 4px;
    background: #A5C740;
    margin: 10px auto 20px;
}

/* --- Responsive (below 600px) --- */
@media (max-width: 600px) {
    .rating-chips {
        flex-direction: column;
    }

    .chip span {
        display: block;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .admin-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    .logo {
        max-width: 160px;
    }

    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}
