/* Shared wrapper */
.apd-daily-wrapper {
    max-width: 900px;
    margin: 20px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apd-daily-header {
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.apd-daily-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.apd-daily-header p {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}

.apd-alert {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}
.apd-alert-success {
    background: #dcfce7;
    color: #166534;
}

.apd-daily-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 12px 30px rgba(15,23,42,0.12);
}

.apd-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.apd-form-field label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    display: block;
    margin-bottom: 4px;
}

.apd-form-field input,
.apd-form-field select,
.apd-form-field textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    box-sizing: border-box;
}

.apd-form-field textarea {
    resize: vertical;
}

/* Task cards */

.apd-tasks-container {
    margin-top: 10px;
}

.apd-task-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(15,23,42,0.08);
    margin-bottom: 12px;
}

.apd-task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.apd-task-label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.apd-task-remove-btn {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.apd-task-remove-btn:hover {
    background: #fecaca;
}

/* Add task button */

.apd-add-task-row {
    margin-top: 10px;
    text-align: left;
}

.apd-add-task-btn {
    border-radius: 999px;
    border: 1px dashed #1f2937;
    padding: 6px 14px;
    background: #f9fafb;
    font-size: 13px;
    cursor: pointer;
}
.apd-add-task-btn:hover {
    background: #e5e7eb;
}

/* Submit row */

.apd-submit-row {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.apd-hint {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.apd-submit-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    background: #111827;
    color: #f9fafb;
    font-size: 13px;
    cursor: pointer;
}
.apd-submit-btn:hover {
    background: #020617;
}

/* Admin UI */

.apd-wrap .apd-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.08);
    margin-top: 16px;
}

.apd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.apd-card-header h2 {
    margin: 0;
    font-size: 16px;
}
.apd-card-header p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.apd-filter-form select {
    padding: 4px 8px;
    border-radius: 8px;
}

/* Admin table */

.apd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.apd-table th,
.apd-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.apd-table th {
    background: #f9fafb;
    font-weight: 600;
}

/* Badges & tags */

.apd-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.apd-badge-submitted { background:#e0f2fe; color:#0369a1; }
.apd-badge-in_review { background:#fef3c7; color:#92400e; }
.apd-badge-completed { background:#dcfce7; color:#166534; }
.apd-badge-revision { background:#fee2e2; color:#b91c1c; }
.apd-badge-pending { background:#e5e7eb; color:#374151; }

.apd-tag {
    display:inline-block;
    padding:2px 6px;
    border-radius:6px;
    background:#f3f4f6;
    font-size:11px;
}

.apd-muted {
    color:#6b7280;
    font-size:12px;
}

.apd-desc {
    color:#4b5563;
}

/* Admin inline form */

.apd-inline-form {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.apd-status-select {
    width: 100%;
    max-width: 200px;
}

.apd-remarks-input {
    width: 100%;
    max-width: 260px;
    min-height: 38px;
}

.apd-btn-small {
    border: none;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    background:#1d4ed8;
    color:#ffffff;
}
.apd-btn-small:hover {
    background:#1e40af;
}

.apd-remarks-view {
    margin-top: 4px;
    font-size: 12px;
    color:#374151;
}

/* Responsive tweaks */

@media (max-width: 640px) {
    .apd-submit-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
