/* Complaint Cell Manager - Shared Styles */

.ccm-admin-wrap .ccm-page-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.ccm-alert {
    padding: 10px 14px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
}
.ccm-alert-success {
    background: #e6ffed;
    border-left: 4px solid #28a745;
}
.ccm-alert-error {
    background: #ffe6e6;
    border-left: 4px solid #dc3545;
}

.ccm-admin-nav {
    margin-bottom: 16px;
    border-bottom: 1px solid #ddd;
}
.ccm-tab {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    text-decoration: none;
    border-radius: 4px 4px 0 0;
    background: #f1f1f1;
    color: #333;
}
.ccm-tab-active {
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    color: #fff;
}

.ccm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 16px;
    margin: 16px 0;
}
.ccm-stat-card {
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg,#f9fafb,#e5f2ff);
    text-decoration: none;
    color: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.ccm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.ccm-stat-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #555;
}
.ccm-stat-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    margin-top: 6px;
}
.ccm-stat-due {
    background: linear-gradient(135deg,#ffe4e1,#ffd1d1);
}
.ccm-stat-inprocess {
    background: linear-gradient(135deg,#fff4ce,#ffe08a);
}
.ccm-stat-completed {
    background: linear-gradient(135deg,#e0ffe9,#b5f5c9);
}

.ccm-filter-form {
    margin: 10px 0 20px;
}
.ccm-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 12px;
    align-items: flex-end;
}
.ccm-filter-grid label {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.ccm-filter-grid input,
.ccm-filter-grid select {
    width: 100%;
}
.ccm-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ccm-import-export {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}
.ccm-import-export .ccm-import-form input[type="file"] {
    max-width: 220px;
}

.ccm-table-wrap {
    margin-top: 10px;
}

/* Form + Buttons */
.ccm-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    margin-top: 16px;
}
.ccm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ccm-form,
.ccm-form-frontend {
    margin-top: 10px;
}
.ccm-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 12px 16px;
}
.ccm-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}
.ccm-form-row label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}
.ccm-form-row input[type="text"],
.ccm-form-row input[type="email"],
.ccm-form-row input[type="password"],
.ccm-form-row input[type="date"],
.ccm-form-row input[type="number"],
.ccm-form-row input[type="datetime-local"],
.ccm-form-row select,
.ccm-form-row textarea {
    border-radius: 4px;
    border: 1px solid #ccd0d4;
    padding: 6px 8px;
    font-size: 13px;
}
.ccm-form-row small {
    font-size: 11px;
    color: #666;
}
.ccm-form-actions {
    margin-top: 12px;
}

.ccm-button {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    background: #e0e0e0;
    color: #222;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
}
.ccm-button-primary {
    background: linear-gradient(135deg,#0073aa,#00a0d2);
    color: #fff;
}
.ccm-button-secondary {
    background: #f3f4f6;
    color: #111;
}
.ccm-button:hover {
    opacity: .92;
}
.ccm-link {
    text-decoration: none;
    color: #0073aa;
}
.ccm-link:hover {
    text-decoration: underline;
}
.ccm-link-danger {
    color: #b91c1c;
}

/* Details + timeline */
.ccm-details-grid {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1.5fr);
    gap: 20px;
    margin: 16px 0;
}
.ccm-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.ccm-details-list li {
    margin-bottom: 4px;
    font-size: 13px;
}
.ccm-image-preview img,
.ccm-image-preview-large img {
    border-radius: 6px;
}

.ccm-timeline {
    margin-top: 12px;
    border-left: 3px solid #e5e7eb;
    padding-left: 12px;
}
.ccm-timeline-item {
    position: relative;
    margin-bottom: 12px;
    padding-left: 10px;
}
.ccm-timeline-item::before {
    content: "";
    position: absolute;
    left: -13px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #9ca3af;
}
.ccm-timeline-progress::before {
    background: #3b82f6;
}
.ccm-timeline-status::before {
    background: #10b981;
}
.ccm-timeline-reminder::before {
    background: #f97316;
}
.ccm-timeline-meta {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}
.ccm-timeline-body {
    font-size: 13px;
}

/* Frontend form */
.ccm-form-frontend {
    max-width: 640px;
    margin: 10px auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 18px 18px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ccm-form-frontend .ccm-form-row {
    margin-bottom: 10px;
}

/* Checkbox groups (Mark To + Permissions) */
.ccm-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.ccm-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}
.ccm-checkbox input[type="checkbox"] {
    margin: 0;
}
.ccm-permissions-group {
    margin-top: 8px;
}

/* Badges for Mark To display */
.ccm-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0f172a;
    font-size: 11px;
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .ccm-details-grid {
        grid-template-columns: 1fr;
    }
    .ccm-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
